<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMeshPart/setIndexRange(indexOffset:indexCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer16LowLevelMeshPartC13setIndexRange11indexOffset0K5CountySi_SitAA0dE18RenderContextErrorVYKF"
  },
  "title" : "setIndexRange(indexOffset:indexCount:)"
}
-->

# setIndexRange(indexOffset:indexCount:)

Updates the first index and index count for this mesh part.

```
final func setIndexRange(indexOffset: Int, indexCount: Int) throws(LowLevelRenderContextError)
```

## Parameters

`indexOffset`

The byte offset of the first index within the index buffer.

`indexCount`

The number of indices to use for this part.

## Discussion> Throws: ``doc://com.apple.RealityKit/documentation/RealityKit/LowLevelRenderContextError`` if the resulting range falls outside the mesh resource’s index buffer.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)