---
title: "object(at:)"
framework: modelio
role: symbol
role_heading: Instance Method
path: "modelio/mdlasset/object(at:)"
---

# object(at:)

Returns the top-level object at the specified index in the asset.

## Declaration

```swift
func object(at index: Int) -> MDLObject
```

## 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

- [subscript(_:)](modelio/mdlasset/subscript(_:).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)
