using System; using UnityEngine; namespace LanLib.UpdateManager { /// /// abstract class with automatic registration in . /// /// /// Instances will register themselves for updates in the OnEnable message and unregister in the OnDisable message. /// /// [Obsolete("Prefer inheriting AManagedBehaviour and implementing the IUpdatable/ILateUpdatable/IFixedUpdatable interfaces directly.")] public abstract class AUpdateManagerBehaviour : MonoBehaviour, IUpdatable { protected virtual void OnEnable() { this.RegisterInManager(); } protected virtual void OnDisable() { this.UnregisterInManager(); } /// /// Implement this for receiving managed updates from . /// /// public abstract void ManagedUpdate(); } }