Exemple #1
0
 void OnDisable()
 {
     if (_instance == this)
     {
         _instance = null;
     }
 }
 void OnEnable()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
Exemple #3
0
 void OnEnable()
 {
     if (_instance == null)
     {
         _instance = this;
     }
 }
 void OnDisable()
 {
     if (_instance == this)
     {
         _instance = null;
     }
 }