Hello. A long term issue I have had with Unity is that the Audio Sources, once activated, can be heard all over the map. I thought I had fixed this a while ago using this, but it recently came back with a vengeance. Now the issue is that the audio source drops off far too slowly, meaning that while it should really mute at a distance of 3, it instead can be heard across the map.
I have also encountered a second issue where even manually deleting the audio source from the object in Inspector wonāt shut off the noise. Instead, it keeps playing on the object, and only disabling the object itself will stop it. This seems to be a bug, honestly.
I added a Sound_Emitter to try to make it respect walls, but that didnāt work either.
How are you moving around the map? If youāre switching back to the scene view after hitting āplayā and moving around then the soundās volume wonāt diminish because the scene viewās camera doesnāt have an audio listener. I suspect that for whatever reason your audio source always has an audio listener nearby.
Building on what Zulo says above⦠you should SEE on the AudioSource itself the distance to the listener as a vertical line labeled āLISTENER,ā something like this:
It is live-updated as you move either the AudioSource or the AudioListener around. You can open a dupe Inspector window on the source and lock it to watch as you move your listener.
Iām moving the player around the map the way you would in the game, and listening with them. I donāt think scene view has audio?
I can, and it seems to work there. Thing Iāve just noticed is that there are actually TWO sounds. Thereās the sound of the thing itself, which actually does drop off properly. Thatās the one coming from the Audioo source. But then, thereās this āotherā sound that plays even if you delete everything on the gameObject, but stops when the gameObject is disabled or deleted.
I have no idea what to even debug with this. Thereās no code.
Oh, and I donāt know if it matters, but these are VFX objects. Which I am also suddenly having issues with. Seems the particle system is adding a blank particle emitter to all my VFX that spews magenta cubes at me. Dunno why. Only shows up in the play window.
If youāre new to VFX graph and youāre fumbling around with a prefab that uses it then itās possible that the particle system is set to trigger a script on a specific event. And the script may in turn be playing a sound. With as many particles as shown in your screenshot Iād get rid of the script and have it play a looping sound (rainfall?) while the particles are active. Because triggering/playing 100s of sound per second canāt be good for performance.
If thereās a script, itās not one I know about. Sorry. Itās actually playing some kind of ominous background ambiance thing. Doesnāt seem to be multiplying copies.
Honestly, I am new to VFX, though. I canāt find any working tutorials for HDRP.
If your particle system is triggering a script thatās playing a sound then it may be playing the sound through PlayClipAtPoint which temporarily instantiates a gameObject with its own audio source. You may be able to see it in the hierarchy.