Chapter 12. Sound and Music

Our character can do lots of things now. She can shop, she can fight, she can run away, and explore a map, but it's as if she is doing it in a soundless vacuum. Therefore, it's time to add some sound and music to our game.

Unity has a lot of built-in functionality when it comes to audio, much of it is beyond the scope of this book. You can mix audio, create 3D sounds, and do all sorts of fancy things with audio within Unity. We're going to cover the basic functionality of adding sound and music to get you started on your auditory journey.

The topics that will be covered in this chapter are as follows:

  • Adding background music to your game
  • Adding sound effects to your game
  • Muting and unmuting audio

Choosing the appropriate ...

Get Mastering Unity 2D Game Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.