<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLBlitPassSampleBufferAttachmentDescriptorArray/setObject:atIndexedSubscript:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLBlitPassSampleBufferAttachmentDescriptorArray(im)setObject:atIndexedSubscript:"
  },
  "title" : "setObject:atIndexedSubscript:"
}
-->

# setObject:atIndexedSubscript:

Copies the properties of a blit pass sample buffer attachment descriptor instance to the properties of one of the array’s instances.

```
- (void) setObject:(MTLBlitPassSampleBufferAttachmentDescriptor *) attachment atIndexedSubscript:(NSUInteger) attachmentIndex;
```

## Parameters

`attachment`

An [`MTLBlitPassSampleBufferAttachmentDescriptor`](/documentation/Metal/MTLBlitPassSampleBufferAttachmentDescriptor) instance that the method assigns its properties values to the properties of the array’s instance at `attachmentIndex`.

    You can reset the property configuration of the array’s instance at     `attachmentIndex`     to its default values by passing     `nil`    .

`attachmentIndex`

An index into the array’s copies of attachment descriptor instances.

## Discussion

The array has at

---

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)