I’m using Master Audio(just updated to 2022) in several of my projects and I love it.
I wonder if there is a way to stop one sound group instead of all sound groups. Here is my scenario:
I’m having a 2D flying bat that will fly up and down. I want the player to hear the flying sound of the bat when the distance between the bat and the player is lesser than 5. I have a script that will detect the distance between the bat and the player and will run MasterAudio.PlaySound(fly) when the bat is close enough to the player and will run MasterAudio.StopAllSound(fly) when the bat is away from the player. The idea is similar to ambiance sound but in 2D. My solution works fine when there is only one bat but if there are two bats in range, as soon as one bat flies out of the range, all flying sounds stop. Thus I wonder if I can stop one looping fly sound instead of all fly sounds in the sound group. Is there any way I can achieve this or if there is another workarounds? Thanks!