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 example : MonoBehaviour {
void Start() {
Mesh mesh = GetComponent<MeshFilter>().sharedMesh;
print(mesh.vertexCount);
}
}
import UnityEngine
import System.Collections
class example(MonoBehaviour):
def Start():
mesh as Mesh = GetComponent[of MeshFilter]().sharedMesh
print(mesh.vertexCount)