Esempio n. 1
0
 // Start is called before the first frame update
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject); return;
     }
     instance = this;
 }
Esempio n. 2
0
 void OnDestroy()
 {
     instance = null;
 }