Graphics Reference
In-Depth Information
8
Recipe: Sound
Manager
Audio can make or break a video game. Good audio can provide a deeper level of immer-
sion by reinforcing the themes of the game world and filling out environments into living,
noise-making places. On the other hand, bad audio can irritate players and turn a good
gameplay experience into something repetitive and empty.
Most commercial games have several different layers of audio playing at the same
time, transitioning or changing contextually. To achieve commercial levels of audio,
Unity's audio system will need a lot of help. Out of the box, it isn't exactly an easy process
to do some simple tasks, such as fading audio in and out or controlling volume levels. To
accomplish even basic functionality, extra audio management code is required.
he audio code in this topic provides the following functionality to our framework:
1. To provide a single audio source for multiple audio clips
2. To be able to manage audio clips from a single source
3. To be able to play, pause, or stop an audio clip
4. To be able to play, pause, or stop music streaming from disc
5. To provide volume control functions to set volume and fade music in and out
6. To provide accessibility, by being a static singleton instance, so that all calls to
audio are of the same format
Search WWH ::




Custom Search