void Awake()
 {
     if (brainControl == null) {
         DontDestroyOnLoad (gameObject);
         brainControl = this;
     }
     else if (brainControl != this) {
         Destroy(gameObject);
     }
 }
Пример #2
0
 void Awake()
 {
     if (brainControl == null)
     {
         DontDestroyOnLoad(gameObject);
         brainControl = this;
     }
     else if (brainControl != this)
     {
         Destroy(gameObject);
     }
 }