
Unity Certified Programmer Exam Guide
By :

In this section, we are going to look at adding background music to our game levels. We will also be updating our scripts so that our music volume changes at different points of the game.
In the following sections, we are going to do the following:
So, let's make a start and add our game music to the level1
scene.
In this section, we are going to update the GameManager
game object so that it holds a new game object (called LevelMusic
) as a child in the Hierarchy window. We will then assign LevelMusic's AudioSource
component and an MP3 fileto play. This kind of setup is ideal for a simple game; otherwise, we potentially run the risk of adding another manager, which is only suitable...