Mesh.subMeshCount 子网格数

var subMeshCount : int

Description描述

The number of submeshes. Every material has a separate triangle list.

子网格的数量。每种材质都有一个独立的网格列表。

参见: GetTriangles, SetTriangles.

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		Mesh mesh = GetComponent<MeshFilter>().mesh;
		Debug.Log("Submeshes: " + mesh.subMeshCount);
	}
}
function Start() {
	var mesh : Mesh = GetComponent(MeshFilter).mesh;
	Debug.Log("Submeshes: " + mesh.subMeshCount);
}
Page last updated: 2010-12-9