void Awake() { if(manager) Destroy(manager.gameObject); manager = this; audioSources = GetComponents<AudioSource>(); for (int i = 0; i < audioSources.Length; i++) { maxVolumes[i] = audioSources[i].volume; audioSources[i].clip = clips[i]; } }
void Awake() { if (manager) { Destroy(manager.gameObject); } manager = this; audioSources = GetComponents <AudioSource>(); for (int i = 0; i < audioSources.Length; i++) { maxVolumes[i] = audioSources[i].volume; audioSources[i].clip = clips[i]; } }