Immersion Starts with Sound
Sound is arguably the most important part of any video game. A game's sound can create tension, emotion, and immersion. Creating background music with the Unity Engine is actually very easy. Let's begin!
Objective: Create looping background music for our game.
The first thing we need to do is create an empty Game Object that will act as our Audio Manager:
Name the new Empty Object “Audio_Manager.”
Now create a new Empty Object within the one you just created and name it Background_Music:
We should create the Background_Music as a child of the Audio_Manager because the music will only serve one purpose, to play in the background o the game on loop.
Inside the Background_Music object, add a new component called ‘Audio Source.’
Drag the audio clip you want to use into the AudioClip of the Audio Source component:
The last thing to do is to make sure that ‘Play On Awake’ is enabled and enable ‘Loop.’