Esempio n. 1
0
 protected void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Esempio n. 2
0
 protected override void Awake()
 {
     base.Awake();
     if (Instance != null)
     {
         Destroy(this);
         return;
     }
     Instance = this;
 }