<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EntityAction",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12EntityActionP"
  },
  "title" : "EntityAction"
}
-->

# EntityAction

A protocol that defines an action for an entity.

```
protocol EntityAction
```

## Overview

Structures that conform to `EntityAction` can contain data that an [`ActionAnimation`](/documentation/RealityKit/ActionAnimation) stores.
If your apps needs to serialize the animation resource to a file,
the structure also needs to adopt and conform to the
<doc://com.apple.documentation/documentation/Swift/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`](/documentation/RealityKit/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 ``doc://com.apple.RealityKit/documentation/RealityKit/BlendShapeWeights``.

## Relationships

### Conforming Types

[`BillboardAction`](/documentation/RealityKit/BillboardAction)

[`OrbitEntityAction`](/documentation/RealityKit/OrbitEntityAction)

[`ImpulseAction`](/documentation/RealityKit/ImpulseAction)

[`PlayAudioAction`](/documentation/RealityKit/PlayAudioAction)

[`SetEntityEnabledAction`](/documentation/RealityKit/SetEntityEnabledAction)

[`FromToByAction`](/documentation/RealityKit/FromToByAction)

[`PlayAnimationAction`](/documentation/RealityKit/PlayAnimationAction)

[`EmphasizeAction`](/documentation/RealityKit/EmphasizeAction)

[`SpinAction`](/documentation/RealityKit/SpinAction)

### Inherited By

[`BehaviorTreeAction`](/documentation/RealityKit/BehaviorTreeAction)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)