---
title: ActionAnimation
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/actionanimation
---

# ActionAnimation

Defines an an action animation.

## Declaration

```swift
struct ActionAnimation<ActionType> where ActionType : EntityAction
```

## Overview

Overview The definition is used to generate an action animation based AnimationResource that can then be played by calling playAnimation(_:transitionDuration:blendLayerOffset:separateAnimatedValue:startsPaused:clock:handoffType:) Action animations can be used to perform operations in lock-step with playback. Actions can be grouped or sequenced with pre-existing animation resources or be stand alone. For example an action that triggers sound can be grouped with a sampled animation to trigger sound effects at the appropriate times during playback. See: group(with:) Stand alone action animations can animate target values using RealityKit’s animation engine with cross fade, and additive compositing support. (See: AnimationStateProtocol)

## Topics

### Initializers

- [init(for:events:name:bindTarget:blendLayer:repeatMode:fillMode:trimStart:trimEnd:trimDuration:offset:delay:speed:)](realitykit/actionanimation/init(for:events:name:bindtarget:blendlayer:repeatmode:fillmode:trimstart:trimend:trimduration:offset:delay:speed:).md)

### Instance Properties

- [action](realitykit/actionanimation/action.md)
- [bindTarget](realitykit/actionanimation/bindtarget.md)
- [blendLayer](realitykit/actionanimation/blendlayer.md)
- [delay](realitykit/actionanimation/delay.md)
- [duration](realitykit/actionanimation/duration.md)
- [eventDefinitions](realitykit/actionanimation/eventdefinitions.md)
- [fillMode](realitykit/actionanimation/fillmode.md)
- [name](realitykit/actionanimation/name.md)
- [offset](realitykit/actionanimation/offset.md)
- [repeatMode](realitykit/actionanimation/repeatmode.md)
- [speed](realitykit/actionanimation/speed.md)
- [trimDuration](realitykit/actionanimation/trimduration.md)
- [trimEnd](realitykit/actionanimation/trimend.md)
- [trimStart](realitykit/actionanimation/trimstart.md)

### Type Aliases

- [ActionAnimation.EventDefinitionType](realitykit/actionanimation/eventdefinitiontype.md)
- [ActionAnimation.EventParameterType](realitykit/actionanimation/eventparametertype.md)

## Relationships

### Conforms To

- [AnimationDefinition](realitykit/animationdefinition.md)

## See Also

### Action management

- [EntityAction](realitykit/entityaction.md)
- [ActionEntityResolution](realitykit/actionentityresolution.md)
- [ActionHandlerProtocol](realitykit/actionhandlerprotocol.md)
