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

# ActionEventDefinition

Defines an action event interval, and any associated parameters.

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

## Overview

Start, update, end, and skipped events are raised based on one or more event intervals
defined by the action animation.

Also see: [`ActionEventType`](/documentation/RealityKit/ActionEventType)

## Topics

### Initializers

[`init(startTime: TimeInterval, duration: TimeInterval, parameter: ActionEventDefinition<ActionType>.EventParameterType?)`](/documentation/RealityKit/ActionEventDefinition/init(startTime:duration:parameter:))

Constructs an event definition.

### Instance Properties

[`var duration: TimeInterval`](/documentation/RealityKit/ActionEventDefinition/duration)

The event interval’s duration.

[`var parameter: ActionEventDefinition<ActionType>.EventParameterType?`](/documentation/RealityKit/ActionEventDefinition/parameter)

Optional parameter data available to the event handler at the time of the event.

[`var startTime: TimeInterval`](/documentation/RealityKit/ActionEventDefinition/startTime)

The time at which the event interval starts.

### Type Aliases

[`typealias EventParameterType`](/documentation/RealityKit/ActionEventDefinition/EventParameterType)

---

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)