O'Reilly logo

Unity 3 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a sound and replay button

Finally, we are in the last step of this chapter. We will add sound effects and a simple replay button for us to be able play this again.

Prepare for Lift Off

Let's make sure that we have all the graphics that we need for the replay button; go to the Chapter1 folder in the Project window, and make sure we have restartButtonOut.png and restartButtonOver.png in our subfolder Buttons. We also need some sound effects to use for our character, go to our Sound subfolder. We will see button_click. aiff, doorOpen.wav, getKey.aiff, and Jump.wav. Unity, by default, translates every sound that we import in our project to 3D, but we don't really need it as we are creating a 2D game. So, we will click on each sound in the Sound ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required