Hi, i have a problem with pause and replay multipe audiosource.
I have a game object, and in this i have add 5 audiosources.
In a certain instant of time during game, some of this audiosources are playing. I want to be able to pause all the audiosource in play(for example when i press the key “p”), and restart this audiosources from the point where they were interrupted(for example when i press another key).
If i write mygameobject.audio.pause() and mygameobject.audio.play(), only the first audiosource work correcty.
Thanks in advance
Use
Foreach (var a in GetComponents<AudioSource>()){
a.Pause(); // Play();
}