AnimationController

Class
Manages the animation sequence by controlling its playback direction, duration, and looping behavior.

Properties

Duration: long
LoopType: LoopType
Value: float

Events

OnComplete: Action
Event triggered when the animation sequence completes its progress in the current direction. This can occur at the end of a single animation, after a loop iteration, or as part of a ping-pong transition, depending on the set AnimationController.LoopType.
OnUpdate: Action<float>
Event triggered during each update of the animation's progress. This event allows subscribers to receive the current normalized value of the animation, ranging between 0.0 and 1.0, as it progresses.

Constructors

AnimationController(scheduler: IVisualElementScheduler, onUpdate: Action<float>)
AnimationController(scheduler: IVisualElementScheduler)
AnimationController(element: VisualElement, onUpdate: Action<float>)
AnimationController(element: VisualElement)

Methods

Backward(restart: bool): void
Plays the animation in the backward direction, optionally starting from the end.

Parameters

restart:bool - If true, the animation will reset to the end (value 1) before playing. If false, the animation will continue from its current position.
Forward(restart: bool): void
Plays the animation in the forward direction, starting from the beginning if specified.

Parameters

restart:bool - If true, the animation will reset to the beginning (value 0) before playing. If false, the animation will continue from its current position.
Stop(): void
Stops the animation playback and pauses any scheduled updates.

Inherited Members

Extension Methods

DescribeIdentityShortHashToStringNullable

On this page