I’m kind of an audio nerd, and I had the idea to try to make the radio response from the helicopter pilot sound like it’s coming through over an actual radio. A little Googling and I discovered that Unity actually has some rudimentary audio effects and filters built right in!
This is what I did:
- Create a new Audio Mixer (Project Window: Create > Audio Mixer)
- Create a new group under Master called Radio (in Window > Audio Mixer, click the + icon next to Groups)
- Set the Output for the Audio Source to the Radio group (you can do this in the Inspector by selecting the game object with the attached Audio Source; drag and drop “Radio” from the Project Window to the Output field)
- In the Inspector for the Radio group, add these effects with these settings:
The order of effects is important, as the audio passes through each effect sequentially (top to bottom). BE CAREFUL with the volume! The extreme distortion adds a ton of gain, which boosts the audio loud enough to damage your speakers at default volume settings. Crank the attenuation all the way down and slide it up slowly while listening to make sure you don’t blow your speakers (or your eardrums).
All said and done though, this stack of effects pretty convincingly emulates a ****py walkie-talkie/radio speaker. Probably not very performant to do this at runtime (as opposed to editing your audio clips in something like Audacity before you import them into Unity), but it is pretty neat to be able to apply these effects on-the-fly.
Imagine the possibilities: if you’re standing right next to a friendly unit, you hear her speak in her natural (3D) voice, but as you walk out of earshot, her voice seamlessly blends into a (2D) radio transmission. Or maybe you could add reverb to your footsteps and gunshot sounds if you’re inside of a building! Or even, if you want to get really technical (and finnicky), you could apply a subtle low-pass filter to sounds that are coming from behind the player to cheaply emulate a surround sound effect.