Format
typescript
Mesh.subMeshCountclass: Mesh
Description
The number of submeshes in a Mesh object.
Each submesh corresponds to a Material in the Renderer, such as MeshRenderer or SkinnedMeshRenderer. A submesh is a list of triangles that reference a set of vertices. Vertices can be shared between multiple submeshes.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
number |
Code Example
typescript
let mesh = Resources.Load<Mesh>(Mesh, "meshId");
mesh.subMeshCount;