private void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; } }
void Awake() { if (masterSingleton != null && masterSingleton != this) { Destroy(this.gameObject); return; } masterSingleton = this; DontDestroyOnLoad(this.gameObject); }