---
title: EntityAction
framework: realitykit
role: symbol
role_heading: Protocol
path: realitykit/entityaction
---

# EntityAction

A protocol that defines an action for an entity.

## Declaration

```swift
protocol EntityAction
```

## Overview

Overview Structures that conform to EntityAction can contain data that an ActionAnimation stores. If your apps needs to serialize the animation resource to a file, the structure also needs to adopt and conform to the Codable protocol. As action animation playback occurs, unique action events are raised for its associated EntityAction conforming type. These events allow application code to animate target values (see AnimationStateProtocol), and perform custom operations in lock step with animation playback. The action data stored within an action animation is available to the action’s event handler. note: Custom actions don’t support animating BlendShapeWeights.

## Topics

### Associated Types

- [EventParameterType](realitykit/entityaction/eventparametertype.md)

### Instance Properties

- [animatedValueType](realitykit/entityaction/animatedvaluetype.md)
- [isAdditive](realitykit/entityaction/isadditive.md)
- [isReversible](realitykit/entityaction/isreversible.md)

### Type Methods

- [registerAction()](realitykit/entityaction/registeraction().md)
- [subscribe(to:_:)](realitykit/entityaction/subscribe(to:_:).md)
- [unsubscribe(from:)](realitykit/entityaction/unsubscribe(from:).md)
- [unsubscribeAll()](realitykit/entityaction/unsubscribeall().md)

## Relationships

### Inherited By

- [BehaviorTreeAction](realitykit/behaviortreeaction.md)

### Conforming Types

- [BillboardAction](realitykit/billboardaction.md)
- [EmphasizeAction](realitykit/emphasizeaction.md)
- [FromToByAction](realitykit/fromtobyaction.md)
- [ImpulseAction](realitykit/impulseaction.md)
- [OrbitEntityAction](realitykit/orbitentityaction.md)
- [PlayAnimationAction](realitykit/playanimationaction.md)
- [PlayAudioAction](realitykit/playaudioaction.md)
- [SetEntityEnabledAction](realitykit/setentityenabledaction.md)
- [SpinAction](realitykit/spinaction.md)

## See Also

### Action management

- [ActionAnimation](realitykit/actionanimation.md)
- [ActionEntityResolution](realitykit/actionentityresolution.md)
- [ActionHandlerProtocol](realitykit/actionhandlerprotocol.md)
