Immersive Start of Game- Game Dev Series 27

Objective: Create background music when game start.

Previous: Bring Your Game to AAA Status Through Post Processing

This is audio!

Music is a big part if you want the player to immersive in game. We can create a background music simply by adding an Audio Source.

Audio Source is what Unity use to play the music. Besides the source, we will also need a Audio Listener to hear the audio which is a default component inside the camera object. We don’t need to worry about it so far.

To add an Audio Source, create an empty in the root of Hierarchy called Audio Manager, which will easy for us to manage. Inside this object, create another empty called Background which will deal with the background music.
Then add an Audio Source component in it.

With the Audio Source, drag in the background music from Project window to the AudioClip location. And make sure the Play On Awake and Loop is check. You can adjust the volume if you want.

Then you should hear the background music when playing.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
S.J. Jason Liu

S.J. Jason Liu


A passionate gamer whose goal is to work in video game development.