var vertexCount : int
Description描述
Returns the number of vertices in the mesh (Read Only).
返回网格中顶点的数量(只读的)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
Mesh mesh = GetComponent<MeshFilter>().sharedMesh;
print(mesh.vertexCount);
}
}
function Start () {
var mesh : Mesh = GetComponent(MeshFilter).sharedMesh;
print(mesh.vertexCount);
}