Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetIndexCount

Gets the index count of the given /sub-mesh/. If the mesh contains Mesh LODs, the index count of LOD0.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetIndexCount(int)

Gets the index count of the given /sub-mesh/. If the mesh contains Mesh LODs, the index count of LOD0.
public uint GetIndexCount(int submesh)

Parameters

submesh

The index of the sub-mesh to get the indices for. See subMeshCount.

Returns

Type

Description

uintThe index count.

Remarks

Additional Resources: Mesh.SetIndices, Mesh.GetIndexStart.

GetIndexCount(int, int)

Gets the index count of the given /sub-mesh/ and level of detail. When meshlod has a value of -1, this returns the index count for the specified sub-mesh (which can include multiple LODs).
public uint GetIndexCount(int submesh, int meshLod)

Parameters

submesh

The index of the sub-mesh to get the indices for. See subMeshCount.

meshLod

The Mesh LOD index. A value of -1 gets the count for the sub-mesh.

Returns

Type

Description

uintThe index count.