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