Ejemplo n.º 1
0
 void Awake()
 {
     main             = this;
     soundEffectsDict = new Dictionary <string, AudioClip>();
     AudioClip[] clips = Resources.LoadAll <AudioClip>("Audio");
     for (int i = 0; i < clips.Length; i++)
     {
         string name    = clips[i].name;
         int    counter = 1;
         while (soundEffectsDict.ContainsKey(name))
         {
             name = clips[i].name + "(" + counter++ + ")";
         }
         soundEffectsDict.Add(name, clips[i]);
     }
     mixerGroups = mixer.FindMatchingGroups("");
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }