public virtual void OnDisable() { if (UsesUpdate()) { PooledUnityCalls.RemoveUpdate(this); } }
public virtual void OnEnable() { if (UsesUpdate()) { PooledUnityCalls.AddUpdate(this); } }
private void Awake() { if (instance != null) { Debug.LogError("Multiple instances of singleton! Destroying offending component."); Destroy(this); return; } instance = this; }