Unity: Adding audio to increase immersion

Games can look amazing but without audio, they fall short. In this article we’ll add some background music to immerse our players.

Ian Plumpton
Jul 2, 2021

We’ll start by adding an empty gameobject called AudioManager. This will eventually handle scripting for audio events but for now it will house another child object called Background.

We add an Audio Source component to Background. Because this will be our background music we want to to play when the game starts and play constantly while the game runs. We make sure Play On Awake and Loop are checked to achieve this.

Finally we drag our music file to the AudioClip in Background and that’s it, we now have some excellent mood music for our game.

In the next article we’ll go over adding audio events like laser fire and explosions.

--

--

Ian Plumpton

Software developer in the field of Unity and C#. Passionate about creating and always driven to develop.