Game Development Reference
In-Depth Information
• Echo Filter
• Distortion Filter
• Chorus Filter
• Reverb Filter
• Reverb Zone (Pro and Free)
HOW SOUND WORKS IN UNITY
The basic principle of sound in Unity is determined by two Game Object Components—the Audio
Listener and the Audio Source. Both of these components work in combination with the sound i le
itself. You can think of the Audio Listener as you—or, more specii cally, as your ears, or perhaps a
microphone—while the Audio Source is, as you might expect, the source of the audio, which can be
any object in the game world.
Audio Listener
The Audio Listener Component is usually attached to a i rst- or a third-person controller combined with
a camera (which represents your eyes or your view of yourself ). An Audio Listener is necessary only
if the sound functions within a three-dimensional environment; it is not generally needed for a two-
dimensional game. Unity limits you to only one Audio Listener.
Audio Source
The Audio Source Component is just that, a source of audio in the game world. Audio sources can be set
up to play 2D or 3D sounds in a variety of ways. One way is a simple ambient background that loops. You've
already heard examples of this in the Mushroom Forest game environment we covered in a previous level.
If the Audio Source is attached to an object and plays continuously, distance from the object is
important in the game, and the volume settings of the Audio Source can be customized to a wide variety
 
Search WWH ::




Custom Search