// remove instance if destroyed private void OnDestroy() { if (_instance == this) { _instance = null; } }
private void Awake() { if (_instance != null) { Destroy(gameObject); } else { _instance = this; _previousZoneName = string.Copy(STARTING_ZONE_ID); _currentZoneName = string.Copy(STARTING_ZONE_ID); _choicesMadeHistory = new List <ChoicesMadeType>(); } }