Animancer v6.0 is currently available for testing.

IUpdatable Interface

Summary

An object that can be updated during Animancer's UnityEngine.Playables.PlayableBehaviour.PrepareFrame(UnityEngine.Playables.Playable,UnityEngine.Playables.FrameData).
graph BT Type-.->Interface0["IKeyedListItem"] click Interface0 "/animancer/api/Animancer/IKeyedListItem" Type["IUpdatable"] class Type type-node Implementing0["MixerParameterTweenVector2"]-.->Type click Implementing0 "/animancer/api/Animancer/MixerParameterTweenVector2" Implementing1["MixerParameterTween<TParameter>"]-.->Type click Implementing1 "/animancer/api/Animancer/MixerParameterTween_1" Implementing2["MixerParameterTweenFloat"]-.->Type click Implementing2 "/animancer/api/Animancer/MixerParameterTweenFloat" Implementing3["CustomFade"]-.->Type click Implementing3 "/animancer/api/Animancer/CustomFade"

Syntax

public interface IUpdatable : IKeyedListItem

Examples

Register to receive updates using Animancer.AnimancerPlayable.RequireUpdate(Animancer.IUpdatable) and stop receiving updates using Animancer.AnimancerPlayable.CancelUpdate(Animancer.IUpdatable).

 public sealed class MyUpdatable : Key, IUpdatable
 {
     private AnimancerComponent _Animancer;

     public void StartUpdating(AnimancerComponent animancer)
     {
         _Animancer = animancer;
         _Animancer.Playable.RequireUpdate(this);
     }

     public void StopUpdating()
     {
         _Animancer.Playable.CancelUpdate(this);
     }

     void IUpdatable.EarlyUpdate()
     {
         // Called at the start of every animation update before the playables get updated.
     }

     void IUpdatable.LateUpdate()
     {
         // Called at the end of every animation update after the playables get updated.
     }

     void IUpdatable.OnDestroy()
     {
         // Called by AnimancerPlayable.Destroy if this object is currently being updated.
     }
 }

Methods

Name Value Summary
EarlyUpdate() void
Called at the start of every UnityEngine.Animator update before the playables get updated.
LateUpdate() void
Called at the end of every UnityEngine.Animator update after the playables get updated.
OnDestroy() void
Called by Animancer.AnimancerPlayable.Destroy if this object is currently being updated.