Exemple #1
0
 void OnDisable()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Exemple #2
0
 void OnEnable()
 {
     if (instance != null)
     {
         Debug.LogError("You can only have one instance of MultitrackAudioSource activeAtOnce.");
         enabled = false;
         return;
     }
     instance = this;
 }