How to play background music in Unity

Adding music to the game

Rusben Guzman
Jul 9, 2021
Photo by C D-X on Unsplash

First we have to create an empty game object called Backgorund_Music and an AudioSource component to it.

Then we just have to check the play on awake attribute and assign the audio clip.

That’s all. When you start the game you should have a background music playing.

Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.