Returns the number of vertices in the mesh (Read Only).
function Start () { var mesh : Mesh = GetComponent.<MeshFilter>().sharedMesh; print(mesh.vertexCount); }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Start() { Mesh mesh = GetComponent<MeshFilter>().sharedMesh; print(mesh.vertexCount); } }