To play sound effects within our game, we will make an event-based system so that playing the sound effects will be very easy. Sound effects are what bring your items, events, and characters to life! They give your gun the loud bang you would expect, the grunt from your character as they climb a wall, and the notification sound that you get when you hover over an option in the menu. Sound effects add to the immersion of your game and playing them can be very easy.
Our first step in playing sound effects will be to create the C# script and name it
SFX_Manager. Next, we will need a few variables; add these to your script:
public float sfxVolume = 1.00f; public AudioClip Run, Spell, Strike; public GameObject ...