Example #1
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Example #2
0
 private void Init()
 {
     if (Instance != null)
     {
         Destroy(this);
         return;
     }
     Instance = this;
 }