Esempio n. 1
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Esempio n. 2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     if (Instance != this)
     {
         Destroy(gameObject);
     }
 }