Unity Essentials - Part 2 - Audio
I spent the past week learning how to integrate audio files in Unity. There are various assets, free and paid, that can be downloaded and installed into a project using Unity's Asset Store. The Audio section has over 700 free asset collections! After learning how to add textures and characters in my first project last week, this week I quickly found ambient music as well as sound effects collections.
The scene I was working on had a pot of boiling water that I used to manipulate how the sound carried throughout the room. To do this, I added a loop function and turned on spatial sound. This allowed for the boiling water to be heard constantly and from afar while the audio's volume increased as the character walked closer to the pot. To mimic how we hear sounds in real life, I also added a Logarithmic Rolloff with a Minimum Distance of 0.5 and a Maximum Distance of 1. Logarithmic Rolloff controls the amplitude of the audio clip which lowers the volume over a distance.
Learning Unity has been immensely fun and with the audio basics completed, I am now getting into my favorite part which is programming. The next learning milestone is digging into the code to manipulate game objects. Unity uses C# and it shouldn't be difficult for me to learn how to use C# since I am knowledgeable with Java and they are both extremely similar.
I'll share more of my progress next week!
Subscribe to my newsletter
Read articles from Sarah Sotomayor directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by