Answer the question
In order to leave comments, you need to log in
How to access all "AudioSorce" in Unity3d?
There is a code by which I have to change the volume of the sounds of all AudioSources on the stage.
void Start()
{
AudioSource[] audioSources = GetComponents<AudioSource>();
foreach (AudioSource audioSource in audioSources)
{
audioSource.volume = volume;
}
}
Collider[] colliders = GetComponentsInChildren<Collider>();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question