Exemple #1
0
 void OnDestroy()
 {
     if (inst == this)
     {
         inst = null;
     }
 }
Exemple #2
0
 void Awake()
 {
     inst = this;
     foreach (var src in transform.GetComponentsInChildren <AudioSource>())
     {
         sources[src.name.ToLower()] = src;
     }
 }