Version: 2017.2

Mesh.vertexCount

切换到手册
public int vertexCount ;

描述

返回网格中的顶点数(只读)。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { Mesh mesh = GetComponent<MeshFilter>().sharedMesh; print(mesh.vertexCount); } }