<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelInstanceData",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20LowLevelInstanceDataC"
  },
  "title" : "LowLevelInstanceData"
}
-->

# LowLevelInstanceData

```
final class LowLevelInstanceData
```

## Topics

### Initializers

[`convenience init(instanceCount: Int) throws`](/documentation/RealityKit/LowLevelInstanceData/init(instanceCount:))

Creates a low-level instance data object with an instance count.

[`init(instanceCount: Int, instanceCapacity: Int) throws`](/documentation/RealityKit/LowLevelInstanceData/init(instanceCount:instanceCapacity:))

Creates a low-level instance data object with an instance count and capacity.

### Instance Properties

[`var instanceCapacity: Int`](/documentation/RealityKit/LowLevelInstanceData/instanceCapacity)

The maximum number of instances this low-level instance data
draws when set on a mesh instances component.

[`var instanceCount: Int`](/documentation/RealityKit/LowLevelInstanceData/instanceCount)

The current number of instances in this low-level instance data.

### Instance Methods

[`func read(using: any MTLCommandBuffer) -> any MTLBuffer`](/documentation/RealityKit/LowLevelInstanceData/read(using:))

Retrieves the current per instance transform data, for GPU reading.

[`func replace(using: any MTLCommandBuffer) -> any MTLBuffer`](/documentation/RealityKit/LowLevelInstanceData/replace(using:))

Retrieves a Metal buffer that you can use to replace the per instance transform data
on GPU using Metal.

[`func replaceMutableTransforms((UnsafeMutableBufferPointer<float4x4>) -> Void)`](/documentation/RealityKit/LowLevelInstanceData/replaceMutableTransforms(_:))

Replaces the per instance transform data synchronously on the CPU.

[`func withMutableTransforms((UnsafeMutableBufferPointer<float4x4>) -> Void)`](/documentation/RealityKit/LowLevelInstanceData/withMutableTransforms(_:))

Updates the per instance transform data synchronously on the CPU.

[`func withTransforms((UnsafeBufferPointer<float4x4>) -> Void)`](/documentation/RealityKit/LowLevelInstanceData/withTransforms(_:))

Reads the per instance transform data synchronously on the CPU.

---

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)