Another thing that we may be looking forward to setting up is the sound effects in our level. There are many predefined sound effect in the prefabs and objects around the level, but we may want to use different types of SFX in other situations, and that's alright. In order to do this, we need to do the following:
- We need to import those sound effects to our project.
- In order to create an example, we will create a moving plant SFX that will be triggered whenever we walk by a plant, giving the players the feeling that they are walking through foliage.
- Once we import the audio file to the assets, we will head to the object we want the audio to be triggered from. In this case, we will select LowerPlants3_19 and add an Audio Source component, as shown in the following screenshot:
- As we have seen before, we will have to drag and drop the audio file into the...