Skip to content

AnimationPlayer

Class | orca.core

Component for managing and playing animations on UI elements.

Overview

Properties

Property Type Description
Clip AnimationClip The AnimationClip object that supplies the curves to animate
Clips AnimationClipReference Array of named animation clips available to this player; use the Play message with a Name to select one by name
NumClips int
Playing bool Whether the animation is currently advancing each frame
Looping bool If true, the animation restarts from StartTime when it reaches StopTime
Speed float Playback speed multiplier (1.0 = normal speed)
CurrentTime float Current playback position within the animation in seconds
AutoplayEnabled bool Enables or disables automatic playback on initialization.
RelativePlayback bool When true, playback is relative to the current state rather than starting from an absolute base state.
RestoreOriginalValuesAfterPlayback bool Restores the original property values after the animation ends.
PlaybackMode PlaybackMode Defines how the animation should be played.
DurationScale float Scales the playback speed of the animation. A value greater than 1.0 speeds up playback, while values between 0.0 and 1.0 slow it down.
RepeatCount int Number of times the animation should repeat. Use -1 to indicate infinite looping.

Messages

Play

Starts or resumes animation playback.

Field Type Description
Name string Name of the clip to play (optional; if set, selects a clip from the Clips array before starting)

Resume

Resumes animation playback from the current position without resetting.

Stop

Stops animation playback and resets CurrentTime to the clip's StartTime.

Pause

Pauses animation playback without resetting CurrentTime.

Started

Sent when animation playback begins.

Stopped

Sent when animation playback stops (via Stop or Pause).

Completed

Sent when animation playback reaches the end of the clip without looping.