1. Make a new 3D Scene called Sounds.
2. Download the Standard Assets and Delete the Error.
Standard Assets> Utility > Simple Activator
3. Add a first person controller and delete the main camera.
4. Search for "free" to find the free look camera C# script. Drag and drop it to your FPS Controller in the Hierarchy. Make sure your target is set to FPSController.
Go into play mode and move your mouse as you walk. You should be able to look left and right now.
5. Go to the Asset Store and search "sound." Notice how many sound effects and background sounds you can get here!
Download at least one sound package.
There are also free websites that host sounds like:
5. Drag sound file onto object in hierarchy. Adjust whether you want it on a loop, how much of a priority it is and how loud it is.
To add music into your game, you simply need two new elements.
You need an audio listener and an audio source.
Audio listener: Think of an audio listener as the element within your game that hears your music. Essentially, this is the part of your world that captures the sounds that are being produced in your game. For example, if your character walks past a portal, that portal might emit a gentle buzzing or electric sound. Something within your game needs to hear those sounds. In most cases, game developers will add their audio listener to their camera. This is because in most games the camera follows the character around and therefore the sounds that are emitted will be picked up and registered by the camera which shares the perspective of the player. Therefore, all game sounds will appear to surround the character from their proper position within 3D space.
Audio source: An audio source is simply object within your game that is producing or emitting sound. That sound could be a sound effect, folly, atmosphere, room tone, dialoge or music.
You need an audio listener and an audio source.
Audio listener: Think of an audio listener as the element within your game that hears your music. Essentially, this is the part of your world that captures the sounds that are being produced in your game. For example, if your character walks past a portal, that portal might emit a gentle buzzing or electric sound. Something within your game needs to hear those sounds. In most cases, game developers will add their audio listener to their camera. This is because in most games the camera follows the character around and therefore the sounds that are emitted will be picked up and registered by the camera which shares the perspective of the player. Therefore, all game sounds will appear to surround the character from their proper position within 3D space.
Audio source: An audio source is simply object within your game that is producing or emitting sound. That sound could be a sound effect, folly, atmosphere, room tone, dialoge or music.
Unity supports many audio file formats including mp3, WAV, MPEG, OGG Vorbis, AIFF, MOD, IT, S3M and XM. You’ll also want to ensure that “loop” is selected so the music continues to loop in the background while your character is in the game world. You’ll also want to select “play on awake” so that the music begins as soon as your character spawns. Lastly, you’ll want to adjust your volume and set your music to play in 2D or 3D space.
6. Adding Background Music into Unity.
Create an empty game object and position at 0,0,0.
Add your audio clip.
Spatial Blend should be 2D so you hear the same sound everywhere you go.
7. Choose a theme.
Add 5 Assets that would benefit from a sound and apply an appropriate sound choice.
Example: A farm with animal noises!