---
title: "subscript(_:)"
framework: modelio
role: symbol
role_heading: Instance Subscript
path: "modelio/mdlasset/subscript(_:)"
---

# subscript(_:)

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

## Declaration

```swift
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 doc://com.apple.modelio/documentation/ModelIO/MDLAsset/count property.

## Return Value

Return Value The object at the specified index.

## Discussion

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

## See Also

### Working with Asset Content

- [object(at:)](modelio/mdlasset/object(at:).md)
- [count](modelio/mdlasset/count.md)
- [childObjects(of:)](modelio/mdlasset/childobjects(of:).md)
- [add(_:)](modelio/mdlasset/add(_:).md)
- [remove(_:)](modelio/mdlasset/remove(_:).md)
- [boundingBox](modelio/mdlasset/boundingbox.md)
- [boundingBox(atTime:)](modelio/mdlasset/boundingbox(attime:).md)
- [url](modelio/mdlasset/url.md)
- [bufferAllocator](modelio/mdlasset/bufferallocator.md)
- [vertexDescriptor](modelio/mdlasset/vertexdescriptor.md)
- [masters](modelio/mdlasset/masters.md)
