Ejemplo n.º 1
0
 private void Awake()
 {
     if (_instance != null)
     {
         Destroy(_instance);
     }
     _instance = this;
     DontDestroyOnLoad(this.gameObject);
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(Instance.gameObject);
     }
     Instance = this;
     DontDestroyOnLoad(gameObject);
 }