<!--
{
  "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/ActionEvent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation11ActionEventV"
  },
  "title" : "ActionEvent"
}
-->

# ActionEvent

The structure returned to all action event handlers.

```
struct ActionEvent<ActionType> where ActionType : EntityAction
```

## Overview

Actions perform their function within one or more custom event handlers
associated with an action type.

The event structure contains useful information for an action to perform its function when
an action event is raised.

> Important: Do not store ``doc://com.apple.RealityKit/documentation/RealityKit/ActionEvent`` instances beyond the event handler’s scope.
> The event contains references (like ``actionStatus``) that are only valid during
> the callback. Storing the event and accessing it later results in undefined behavior.

## Topics

### Instance Properties

[`let action: ActionType`](/documentation/RealityKit/ActionEvent/action)

The action parameter data that remains constant across one or more events intervals
defined for the action animation.

[`var animationState: (any AnimationStateProtocol)?`](/documentation/RealityKit/ActionEvent/animationState)

The animation state for the action.

[`let duration: TimeInterval`](/documentation/RealityKit/ActionEvent/duration)

The duration of the the event.

[`var entity: Entity?`](/documentation/RealityKit/ActionEvent/entity)

The entity that owns the `BehaviorTreeComponent` and initiated this action.

[`let parameter: ActionType.EventParameterType?`](/documentation/RealityKit/ActionEvent/parameter)

The event parameter data that can vary for each event.

[`let playbackController: AnimationPlaybackController`](/documentation/RealityKit/ActionEvent/playbackController)

The animation playback controller that manages the animation executing the action.

[`let reversed: Bool`](/documentation/RealityKit/ActionEvent/reversed)

A Boolean value that indicates reverse playback when true.

[`let startTime: TimeInterval`](/documentation/RealityKit/ActionEvent/startTime)

The start time of the current event.

[`let targetEntity: Entity?`](/documentation/RealityKit/ActionEvent/targetEntity)

The entity the bind target references.

---

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)