// Animancer // Copyright 2020 Kybernetik // using UnityEngine; using UnityEngine.Playables; namespace Animancer { /// /// An object that can be updated during . /// /// Register to receive updates using and stop /// receiving updates using . /// /// /// /// public sealed class UpdatableBehaviour : MonoBehaviour, IUpdatable /// { /// [SerializeField] private AnimancerComponent _Animancer; /// /// private void OnEnable() /// { /// _Animancer.Playable.RequireUpdate(this); /// } /// /// private void OnEnable() /// { /// _Animancer.Playable.CancelUpdate(this); /// } /// /// public void EarlyUpdate() /// { /// // Called at the start of every Animator update before the playables get updated. /// } /// /// public void LateUpdate() /// { /// // Called at the end of every Animator update after the playables get updated. /// } /// /// public void OnDestroy() /// { /// // Called by AnimancerPlayable.Destroy if this object is currently being updated. /// } /// } /// public interface IUpdatable : IKeyHolder { /************************************************************************************************************************/ /// Called at the start of every update before the playables get updated. /// The determines when it updates. void EarlyUpdate(); /// Called at the end of every update after the playables get updated. /// /// The determines when it updates. /// This method has nothing to do with .LateUpdate(). /// void LateUpdate(); /// Called by if this object is currently being updated. void OnDestroy(); /************************************************************************************************************************/ } }