---
title: "sequence(with:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/animationresource/sequence(with:)"
---

# sequence(with:)

Creates an animation resource that plays a collection of animations in a specified sequence.

## Declaration

```swift
@MainActor @preconcurrency static func sequence(with resources: [AnimationResource]) throws -> AnimationResource
```

## Parameters

- `resources`: The collection of animation resources to play.

## Return Value

Return Value An animation resource that plays the given array of animations.

## See Also

### Creating an animation resource

- [generate(with:)](realitykit/animationresource/generate(with:).md)
- [group(with:)](realitykit/animationresource/group(with:).md)
- [repeat(count:)](realitykit/animationresource/repeat(count:).md)
- [repeat(duration:)](realitykit/animationresource/repeat(duration:).md)
