Esempio n. 1
0
 protected void OnDisable()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Esempio n. 2
0
 protected void OnEnable()
 {
     if (Instance != null && Instance != this)
     {
         gameObject.SetActive(false);
         return;
     }
     Instance = this;
 }