Have you ever played a game without audio? I believe that half of the adrenaline rush in a game is caused by the audio effect. If you want to develop a horror game there’s no point without the mysterious noises. In this tech recipe we will show you How to Add Audio in Unity.
As I was developing a horror game as a semester project, I realized the importance of audio effects. You can make the zombies as horrible as you can but if the sound of it is not right then there’s no point. Me and my group fellows titled the game “Gorcan 3D” which is Urdu for gravedigger. So in this game we had to get the gravedigger to if the graves. The zombies were supposed to pop out.
As already mentioned, unity is all about the limits of your mind. If you can imagine it, you can make it. Sky’s the limit. Now if you start counting the number of audios, its better to image being at that place. In our case, we closed our eyes and imagined walking through a deserted graveyard.
How about you start the walk with me right now. When the mysterious door opened, the creek sound was to appear and fade. As you walk along, sounds of dry leafs under the players foot, zombies strawl towards the character. The grave shutting down and opening up. Not to forget the background music which is of prime importance.
There are other sound effects such as the wind blowing, water flowing, birds chirping etc.
How to Add Audio in Unity
Step-by-Step Procedure
Since the main camera usually has the listener attached to it. Let the player be the source if you want to attach movement noise to it.
1. Right click on the player.
2. Click on audio.
3. Download audioclips from the internet.
4. Click on audioclip. And add the required audio.
5. Click on loop if you continuously want to hear the sound in loops.
In the next tech-recipe we will demonstrate to you how to use script to play one-shot or play and pause the sound.
Check out other tech-recipes
How to Set Camera to Follow the Player in Unity | 3D Game Development
How to Add Rigidbody to a Gameobject in Unity | 3D Game Development
Detect Collision in Unity | 3D Game Development
How Can I run Unity 3d in Windows 7 64-bit?
How to Perform Simple Animation in Unity | 3D Game Development