/* Different instance each scene. */ private void OnDestroy() { if (this == _instance) { _instance = null; } }
private void Awake() { /* Enforce Singleton: */ if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }