Adding music

For this example, we have chosen music and a sound effect to add to the game that we have been developing. Using the previously mentioned websites, try to search for a sound effect for the jump and music that would go well with the game. Then, create a folder, name it Audio (to do this, just right–click an empty space on the Assets panel and go to Create | Folder), and inside that folder import the two audio files that you have downloaded, it should look like this:

Now we are going to create an empty GameObject:

This GameObject ...

Get Learning C# 7 By Developing Games with Unity 2017 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.