---
title: "meshPartIndex(modelID:partID:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/meshresource/meshpartindex(modelid:partid:)"
---

# meshPartIndex(modelID:partID:)

Get the mesh part index for a given model and part identifier.

## Declaration

```swift
@MainActor @preconcurrency func meshPartIndex(modelID: String, partID: String) -> Int?
```

## Discussion

Discussion You can use this to resolve string names to part indices for use in MeshInstancesComponent.
