<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCaptureDescriptor/captureObject",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLCaptureDescriptor(py)captureObject"
  },
  "title" : "captureObject"
}
-->

# captureObject

The instance whose contents should be captured.

```
var captureObject: Any? { get set }
```

## Discussion

The default value is `nil`, but you need to set an instance before using this descriptor to start a capture session.

The behavior of the capture session depends on the kind of instance being captured:

- Specify an [`MTLDevice`](/documentation/Metal/MTLDevice) instance to capture commands in command buffers created on any command queues created by the device instance.
- Specify an [`MTLCommandQueue`](/documentation/Metal/MTLCommandQueue) instance to capture commands in command buffers created by a specific command queue.
- Specify an [`MTLCaptureScope`](/documentation/Metal/MTLCaptureScope) instance to indirectly define which commands are captured.

---

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)