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