Пример #1
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     _instance = this;
     DontDestroyOnLoad(this.gameObject);
 }
Пример #2
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     _instance = this;
     DontDestroyOnLoad(this.gameObject);
 }