Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ouya Unity Game Development

You're reading from  Ouya Unity Game Development

Product type Book
Published in Oct 2013
Publisher Packt
ISBN-13 9781783559701
Pages 118 pages
Edition 1st Edition
Languages
Author (1):
Gary Riches Gary Riches
Profile icon Gary Riches

Adding sounds


When you start adding sounds in to your game, it takes on a whole new dimension, you'd be surprised how a game that seems unfinished can suddenly feel almost complete just by adding some sounds effects. We're going to add a sound that will play every time a crate is moved on to a goal tile. With keeping our project tidy in mind, the first step is to create a folder that will store all our sound files.

Click on the Create dropdown menu in the Project panel. Click on Folder and a new folder will be created in the project panel, call the folder Sounds. Import the asset crateOnGoal.mp3 from the files for this chapter to your new Sounds folder.

Sound in Unity requires the following three things:

  • A sound to play

  • A source for the sound to come from

  • A listener to hear the sound

Our Main Camera already has an Audio Listener component attached to it and we have already imported our sound to play, all that's left is to add an audio source with a reference to our sound and a trigger to call...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}