---
title: "subscript(_:)"
framework: realitykit
role: symbol
role_heading: Instance Subscript
path: "realitykit/animationlibrarycomponent/animationcollection/subscript(_:)-45p83"
---

# subscript(_:)

Accesses a single animation in the collection at an index.

## Declaration

```swift
subscript(position: AnimationLibraryComponent.AnimationCollection.Index) -> AnimationLibraryComponent.AnimationCollection.Element { get }
```

## Parameters

- `position`: An index into the collection’s dictionary.

## Return Value

Return Value The animation at the dictionary index.

## See Also

### Accessing animations

- [subscript(_:)](realitykit/animationlibrarycomponent/animationcollection/subscript(_:)-4sfyo.md)
- [subscript(_:)](realitykit/animationlibrarycomponent/animationcollection/subscript(_:)-2n5pw.md)
- [AnimationLibraryComponent.AnimationCollection.SubSequence](realitykit/animationlibrarycomponent/animationcollection/subsequence.md)
- [AnimationLibraryComponent.AnimationCollection.Element](realitykit/animationlibrarycomponent/animationcollection/element.md)
