Book Image

Mastering Unity 5.x

By : Alan Thorn
Book Image

Mastering Unity 5.x

By: Alan Thorn

Overview of this book

Mastering Unity 5.x is for developers wishing to optimize the features of Unity 5.x. With an in-depth focus on a practical project, learn all about Unity architecture and impressive animation techniques. With this book, produce fun games with confidence.
Table of Contents (16 chapters)
Mastering Unity 5.x
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Music and audio


To complete basic level configuration and structure, let's add music. Specifically, the main background music, which should play continuously throughout the level. In the previous chapter, we imported audio assets, both music and sound effects, and configured these optimally. As discussed previously, it is most important that music is configured for Streaming as the Load Type, and the Compression Format should be set to Vorbis. This ensures that Unity doesn't load the complete track into memory, which would be performance prohibitive, especially for mobile devices and legacy hardware.

Configuring music audio

In addition to importing music assets, let's create an Audio Mixer asset. This is optional in theory, as Unity can play audio without a mixer. But mixers give you more control over different audio types and their independent volumes and balance (SFX, music, voice, and more). To create an Audio Mixer asset, right-click inside the Project panel and navigate to Create |...