From the course: Unity 4: 2D Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Playing 3D sounds - Unity Tutorial
From the course: Unity 4: 2D Essential Training
Playing 3D sounds
So now our game is really coming together but the one thing that's missing is sound. Let's talk a bit about how to add some simple sound effects to our game. Let's drag the sound files from our resources folder into our assets folder inside if Unity. You'll see that Unity is going to go through and process all the sound files that we dragged in. Now, that they're done processing, let's add a simple sound effect to the projectile that our alien c fires. We're going to need to go into our prefab folder, and look for the projectile, and drag it into our scene. Now, in order for a game object to play a sound we're going to need an audio source. Scroll down and add the component audio source. Here you'll see the source requires a clip and it's automatically selected to play on awake. We're going to go into our sound folder into fx. Go back and reselect our projectile, and from here we're going to drag the following sound effect onto the audio clip. Now let's also set this to loop. We want…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.