To complete basic level configuration and structure, let's add music, specifically, the main background music that should play continuously throughout the level. In the last chapter, we imported audio assets, both music and sound effects, and configured these optimally. As discussed earlier, 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 as it would do with sound and audio. Loading complete music tracks will be performance prohibitive, especially for mobile devices and legacy hardware:
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. However, mixers give you more control over different...