# subMeshIndex

> The index of the sub-mesh to be combined with the other meshes.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public int subMeshIndex { get; set; }
```

### Remarks

The [Mesh.CombineMeshes](/engine/6000.7/script-reference/unityengine/mesh/combinemeshes.md) method uses this property along with the [CombineInstance.mesh](/engine/6000.7/script-reference/unityengine/combineinstance/mesh.md) property to identify the mesh data copy into the combined mesh. If a mesh contains multiple sub-meshes, you must create a separate `CombineInstance` for each sub-mesh.

The default value of this property is 0.

Accepted values range from greater than or equal to 0 and less than the sub-mesh count for the corresponding [CombineInstance.mesh](/engine/6000.7/script-reference/unityengine/combineinstance/mesh.md).
