---
title: "makeMeshInstanceArray(renderTargets:count:)"
framework: RealityKit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "realitykit/lowlevelrendercontextstandalone/makemeshinstancearray(rendertargets:count:)"
---

# makeMeshInstanceArray(renderTargets:count:)

Creates a fixed-capacity ordered collection of mesh instances for the given render targets.

## Declaration

```swift
final func makeMeshInstanceArray(renderTargets: LowLevelRenderTarget.DescriptorSet, count: Int) throws -> LowLevelMeshInstanceArray
```

## Parameters

- `renderTargets`: The set of render target descriptors this array must be compatible with.
- `count`: The maximum number of mesh instance slots to allocate.

## Return Value

Return Value A newly created LowLevelMeshInstanceArray.

## Discussion

Discussion Pass the resulting array to setMeshInstances(_:at:) to submit it for rendering. note: An error if allocation fails.
