Road TO Dev — SFX make laser go pew pew

Rob Smith
May 22, 2021

--

So now that we know how to create background music let’s see how to add a sound effect that’s triggered by a player action such as firing the lasers. First we need to decide what we want to make the sound. Now I plan to use these lasers for the enemy as well so it would make sense to attach the sound on the laser prefab.

Unlike the background music we don’t want this to loop but we would like it to play over our background music so we can raise the priority for that.

As you can see it is quite simple to add a SFX to an object and have it trigger on awake.

https://youtu.be/5Crdl_JWoi8

--

--

Rob Smith

Hi there! I am currently on the path to learn how to become a unity developer and will be documenting my journey as best as I can here. Thanks for looking!