Example #1
0
 private void OnDestroy()
 {
     if (SoundSistem.instance == this)
     {
         SoundSistem.instance = null;
     }
 }
Example #2
0
 private void Awake()
 {
     if (SoundSistem.instance == null)
     {
         SoundSistem.instance = this;
     }
     else if (SoundSistem.instance != this)
     {
         Destroy(gameObject);
     }
 }