Exemplo n.º 1
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 //
 private void Awake()
 {
     //
     s_Instance = this;
 }