Version: Unity 6.1 Alpha (6000.1)
LanguageEnglish
  • C#

CombineInstance.subMeshIndex

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public int subMeshIndex;

Description

The index of the sub-mesh to combine with the other CombineInstance meshes from the CombineMeshes list.

The Mesh.CombineMeshes API uses this property and CombineInstance.mesh to decide what to combine from this CombineInstance. To ensure all sub-meshes of a specific mesh are included in the combined mesh, assign a separate CombineInstance for each sub-mesh.

Accepted values range from greater than or equal to 0 and less than the sub-mesh count for the corresponding CombineInstance.mesh. The default value is 0.

Additional resources: Mesh.CombineMeshes, mesh.