O'Reilly logo

Mastering Unity 5.x by Alan Thorn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Music and audio

Configuring music audio

In addition to importing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required