Beispiel #1
0
 void Awake()
 {
     if (mInstance == null)
     {
         mInstance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Beispiel #2
0
 void Awake()
 {
     if (mInstance == null)
     {
         mInstance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }