<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMeshInstanceArray",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer25LowLevelMeshInstanceArrayC"
  },
  "title" : "LowLevelMeshInstanceArray"
}
-->

# LowLevelMeshInstanceArray

A fixed-capacity collection of mesh instances submitted to the renderer.

```
final class LowLevelMeshInstanceArray
```

## Overview

Instances are placed by index via `setMeshInstance(_:index:)`. Create arrays using
[`makeMeshInstanceArray(renderTargets:count:)`](/documentation/RealityKit/LowLevelRenderContext/makeMeshInstanceArray(renderTargets:count:)) and assign them
to the renderer with [`setMeshInstances(_:at:)`](/documentation/RealityKit/LowLevelRenderer/setMeshInstances(_:at:)).

## Topics

### Setting mesh instances

[`func setMeshInstance(LowLevelMeshInstanceArray.Element, index: Int) throws(LowLevelRenderContextError)`](/documentation/RealityKit/LowLevelMeshInstanceArray/setMeshInstance(_:index:))

Assigns a mesh instance to the slot at the given index, or clears the slot if the instance is nil.

[`var count: Int`](/documentation/RealityKit/LowLevelMeshInstanceArray/count)

The number of instance slots in this array.

### Accessing render targets

[`var renderTargets: LowLevelRenderTarget.DescriptorSet`](/documentation/RealityKit/LowLevelMeshInstanceArray/renderTargets)

The set of render target descriptors this array is compatible with.

### Iterating over instances

[`struct Iterator`](/documentation/RealityKit/LowLevelMeshInstanceArray/Iterator)

An iterator over the mesh instance slots.

### Default Implementations

[Collection Implementations](/documentation/RealityKit/LowLevelMeshInstanceArray/Collection-Implementations)

[Sequence Implementations](/documentation/RealityKit/LowLevelMeshInstanceArray/Sequence-Implementations)

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`Collection`](/documentation/Swift/Collection)

[`Sequence`](/documentation/Swift/Sequence)

[`Copyable`](/documentation/Swift/Copyable)

---

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)