// destroy instance on destroy private void OnDestroy() { if (_instance == this) { _instance = null; } }
private void Awake() { _instance = this; }