Mesh.vertexCount Manual     Reference     Scripting  
Scripting > Runtime Classes > Mesh
Mesh.vertexCount

var vertexCount : int

Description

Returns the number of vertices in the mesh (Read Only).

JavaScripts
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)