quantum-space-buddies/QSB/Utility/OnEnableDisableTracker.cs
Mister_Nebula 1b8878a1cf help
2021-01-26 14:07:17 +00:00

15 lines
362 B
C#

using UnityEngine;
namespace QSB.Utility
{
public delegate void EnableDisableEvent();
public class OnEnableDisableTracker : MonoBehaviour
{
public event EnableDisableEvent OnEnableEvent;
public event EnableDisableEvent OnDisableEvent;
private void OnEnable() => OnEnableEvent?.Invoke();
private void OnDisable() => OnDisableEvent?.Invoke();
}
}