<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLAsset/subscript(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLAsset(im)objectAtIndexedSubscript:"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Returns the top-level object at the specified index in the asset, using subscript syntax.

```
subscript(index: Int) -> MDLObject? { get }
```

## Parameters

`index`

An index in the asset’s list of top-level objects; between zero and the value of the [`count`](/documentation/ModelIO/MDLAsset/count) property.

## Return Value

The object at the specified index.

## Discussion

An asset contains one or more top-level objects (instances of the [`MDLObject`](/documentation/ModelIO/MDLObject) class or one of its subclasses, such as [`MDLMesh`](/documentation/ModelIO/MDLMesh)), each of which may contain a hierarchy of child objects.

---

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)