<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelRenderer/setMeshInstances(_:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer08LowLevelC0C16setMeshInstances_2atyAA0deG13InstanceArrayCSg_SitAA0deC5ErrorVYKF"
  },
  "title" : "setMeshInstances(_:at:)"
}
-->

# setMeshInstances(_:at:)

Assigns a mesh instance array to the given slot index.

```
final func setMeshInstances(_ meshInstances: LowLevelMeshInstanceArray?, at index: Int) throws(LowLevelRendererError)
```

## Parameters

`meshInstances`

The mesh instance array to assign, or `nil` to clear the slot.

`index`

The zero-based slot index to assign to. Must be within `0..<meshInstancesArrayCount`.

## Discussion> Throws: ``doc://com.apple.RealityKit/documentation/RealityKit/LowLevelRendererError`` if the renderer’s render target descriptor is not
> contained in the array’s descriptor set.

---

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)