Learning Outcomes

By the end of this chapter, you will be able to:

Modify Unity and the MusicSystem script to display the game score.

Modify FMOD and the MusicSystem script to add a sequential audio score count.

At the moment, aside from the music changes, there is no indication that you have scored a point. Let’s fix that by adding a display to show the score, as well as adding a sound effect.

The score is based on the Pickup count, so rather than start from scratch, we’ll modify the MusicSystem script, so open this up in your IDE. You can paste over the code from the MusicSystemScript2.txt file:

Get Game Audio with FMOD and Unity 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.