Unity Tutorial 8
In this weeks Unity tutorial, I learned how I can add music to my game. I started by creating an empty gameobject and added an audio source component to it, I then added the audio clip to it and put it on a loop to make sure it plays non stop. I made sure that the spatial blend slider is all the way on 2D, now when I'm in play mode I can hear the music playing right away. You can also mute the audio and change the volume if you want.
Next, I added a new audio source and assigned it the health collectable audio clip. I used an audio source function called 'playoneshot 'which plays the audio clip only when needed. When Ruby collects a health collectable the audio clip will play at that moment.
In the last Unity tutorial, I learned how I can share my finished game with others without them having to install the Unity Editor and downloading all my assets.
I have enjoyed the Unity tutorials as going into this semester I was already comfortable using Unity and I learned a lot while building the 2D game.
Comments
Post a Comment