Beispiel #1
0
 private void Awake()
 {
     if (instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         instance = this;
     }
 }
Beispiel #2
0
 private void Awake()
 {
     if (instance)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         //DontDestroyOnLoad (this.gameObject);
         instance = this;
     }
 }