Making our Game more Immersive using Sound
Create an empty object and call it; Audio_Manager in the Hierarchy; in order for any Gameobject to play audio in Unity, we need to add a component named audio source to it.
Since this is the Audio Manager, we don’t want to add the component to it, instead we need to create another empty object for each type of audio we want to use. So, for our background audio, we need to right click on Audio_Manager, then left click on Create Empty and let’s rename it Background. Now we can add the Audio Source component. Now, drag and drop the audio we want to use into the AudioClip field.

Since we want the background music to play all the time, we need to make sure Play On Awake and Loop is checked. Then if we save the scene and run the game there will be music playing.
Awesome, now that we have some background music, let’s move onto other sounds. Why don’t we start with a sound for the laser being fired? To accomplish this we just need to drag and drop the sound effect; laser_shot into the Hierarchy and from there into our Audio Manager; and rename it Laser_Shot. Then we need to uncheck Play On Awake.
Now we need to find where in our code the laser is being fired; this happens to be in the Player script. We then need to add a variable to our player script similar to:

Now we can cache a reference to _laserSource in our Start method using:

Then at the end of our fireLaser method we can use:

And VOILA!!!! Every time we fire a laser we have the sound effect.
We should now be able to do something similar for the explosion sounds to go with the explosion animations. And we certainly can (although unnecessary in my case) by once again dragging and dropping the sound effect; explosion_sound into the Hierarchy and from there into our Audio Manager; and rename it Explosion_Sound. Then we need to uncheck Play On Awake.
Now we need to find where in our code the explosion animation occurs; this happens to be in the Enemy and Asteroid scripts. We then need to add a variable to our Enemy and Asteroid scripts similar to:

Now we can cache a reference to _explosionSource in our Start methods using:

Then after we instantiate an explosion we can use:

Saving our scripts, jumping back into Unity and pressing play will show that whenever an explosion is instantiated there will also be the explosion sound.
The far easier method in my case is to just drag and drop the explosion_sound onto my Explosion prefab, keeping Play On Awake checked. Then every time the Explosion prefab is instantiated the explosion_sound is automatically played (since I am using the Explosion Prefab whenever an explosion occurs).
Using the same method for the Power Ups as the Laser, and using ***.Play(); before destroying the Power Up object in the Powerup script will have the powerup played each time it is collected.