Simulate realistic audio occlusion through volume dampening and low pass filtering!
[YouTube Demo]
It works: when there's a wall between you and the sound, the sound gets muffled.
It's simple: just attach the single script to any audio source and you're good to go.
It's free: this is a simple audio feature that every Unity developer should have in their toolbox.
Features:
* Occlude sound by layers. Just assign any object to the layer and it will work.
* Enable debug lines in the editor to preview what comes between the player and the audio source.
* Optimized - stop FixedUpdate() calls when player is outside of audible range.
* Full C# source code
Music Credits: Missing Her, The Gateless Gate