# AttachmentIndexArray

> Struct encapsulating a fixed list of attachment indices used when declaring native render passes.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public struct AttachmentIndexArray
```

## Remarks

This fixed size struct allows for non-GC declaration of the required indices. Indices point into the attachment list as pass to [CommandBuffer.BeginRenderPass](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/beginrenderpass.md)

Additional Resources: [CommandBuffer.BeginRenderPass](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer/beginrenderpass.md).

## Static Fields

| Value                                                                                                          | Description                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| [Emtpy](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/emtpy.md)                   | Utility to declare an empty index array.                                                                                                |
| [MaxAttachments](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/maxattachments.md) | Maximum number of indices this struct can hold. This is directly tied to the maximum number of attachments in a native render pass (8). |

## Constructors

| Constructor                                                                                                                                                                                     | Description                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [AttachmentIndexArray(System.Int32)](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/ctor.md#attachmentindexarray\(int\))                                            | Create and initialize a new AttachmentIndexArray. |
| [AttachmentIndexArray(System.Int32\[\])](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/ctor.md#attachmentindexarray\(int\))                                        | Create and initialize a new AttachmentIndexArray. |
| [AttachmentIndexArray(Unity.Collections.NativeArray\{System.Int32})](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/ctor.md#attachmentindexarray\(nativearrayint\)) | Create and initialize a new AttachmentIndexArray. |

## Properties

| Property                                                                                       | Description                                      |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [Length](/engine/6000.7/script-reference/unityengine/rendering/attachmentindexarray/length.md) | Number of elements in the AttachmentIndexArrayp. |
