Version: 2020.2
public int subMeshCount ;

描述

The number of sub-meshes in the MeshData.

每个子网格都对应于 Renderer 中的一个 Material,如 MeshRendererSkinnedMeshRenderer。子网格由引用一组顶点的三角形的列表组成。顶点可以在多个子网格之间共享。

If the MeshData is writeable, you can set the number of sub-meshes using this property. If the MeshData is read-only, this property is read-only.

See Also: Mesh.subMeshCount, GetSubMesh, SetSubMesh, GetIndices, Mesh.AllocateWritableMeshData, Mesh.AcquireReadOnlyMeshData.