Animation Registry
Register
The AnimationManager updates all animations. An animation will only play if it is registered to the AnimationManager instance.
This happens automatically in many cases when working with the Animatables API. Here are the instances in which an animation is registered automatically:
When
AnimationData.Play
is calledWhen an animation is created with any AnimationCreator extension (e.g.,
transform.Move
)When an AnimatableUIObject's
Disable
orEnable
method is called (the relevant list of animations will be registered)When an AnimatableUIObject's
PlayCustomAtIndex
method is calledWhen
AnimatableTransform.Play
is called (the entire list of animations will be registered)
Unregister
The AnimationManager automatically unregisters completed animations. When animations are removed from any Animatable component using any remove animation method, the animation is unregistered as well.
Using AnimationData.Pause
does not unregister the animation; it is simply paused. To manually unregister an animation, use the code below.
Unregister All
To unregister all animations, you can use AnimationManager.ClearAllAnimationsImmediate.
Last updated