Getting started with 3D audio in Unity
Table of contents
For this project, the following are used:
Unity 2022.3.4f1 (although likely applies in general)
Source code: https://github.com/ericjameszimmerman/unityaudio
Basic 3D Audio
For this example, the basic goal was to configure vector-based 3d audio effects.
Steps
Created a new 3d project
Add a plane and (2) spheres
Set one of the spheres as a listener and the other as a source.
For the audio source, I attached an audio clip, associated a mixer and played with some of the effects.
The important part was to increase the 'Spatial Blend' up to '1' or near for audio based on distance from source. With that set, I hit play and moved the source and listener around to observe doppler effect.
💡
To get to "Mixers", goto Window > Audio > Audio Mixer and press the "+" button to add a new mixer. You can attach effects and adjust levels as desired and associate a mixed with one or more sources.
...that is all for the moment.