---
title: ActionEvent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/actionevent
---

# ActionEvent

The structure returned to all action event handlers.

## Declaration

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

## Overview

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 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

- [action](realitykit/actionevent/action.md)
- [animationState](realitykit/actionevent/animationstate.md)
- [duration](realitykit/actionevent/duration.md)
- [entity](realitykit/actionevent/entity.md)
- [parameter](realitykit/actionevent/parameter.md)
- [playbackController](realitykit/actionevent/playbackcontroller.md)
- [reversed](realitykit/actionevent/reversed.md)
- [startTime](realitykit/actionevent/starttime.md)
- [targetEntity](realitykit/actionevent/targetentity.md)

## See Also

### Action events

- [AnimationState](realitykit/animationstate.md)
- [ActionEventType](realitykit/actioneventtype.md)
- [ActionEventDefinition](realitykit/actioneventdefinition.md)
- [AnimationStateProtocol](realitykit/animationstateprotocol.md)
