Ejemplo n.º 1
0
 public void Awake()
 {
     if (Instance != null) {
         Destroy(this);
         return;
     }
     Instance = this;
     gameObject.SetActive(false);
 }
Ejemplo n.º 2
0
 void OnDestroy()
 {
     Instance = null;
 }