- Home /
Adding Explosion Sound Effect
I followed the FPS Tutorial until I got to this,
'Sound effects
Our game world has been a little quiet so far, let’s add a sound effect to our explosion effect.
First let’s assign an audio clip to the Explosion prefab.
To allow the Explosion object to be able to accept an audio clip, we add the Audio Source component to it from the main menu (Component > Audio> Audio Source). You’ll notice one of the properties of this component is the Audio Clip.
Assign "RocketLauncherImpact" to the Explosion prefab’s Audio Clip exposed variable. Unity can play many different audio formats.
Run the game again and our explosion sound effect should be heard when each missile impact.'
I did what it said except I used my own audio clip. When I tested the game I didn't hear and explosion.
How can I fix this?
Joshua, it is set to play on awake, the volume is high enough, and it says the camera does have an audio listener.
Then as soon as you drop an instance of the prefab in your scene it 'should' play.
Have you tried the original RocketLauncherImpact audio clip? It worked fine to me: when the explosion was instantiated the sound played as expected.
I think you need UnityPro to use the 'RocketLauncherImpact' audio clip and I don't have UnityPro.
No, the FPS tutorial contains anything, and doesn't require Unity Pro (maybe only for a special water effect, but surely not for using the sounds; my Unity is Indie too)
Answer by Joshua · Jul 08, 2011 at 02:39 PM
Is it set to play on awake and is the volume high enough?
Do you have an audio listener in your scene as well? If not, attach one to your camera. Component>Audio>Audio Listener.
Your answer
Follow this Question
Related Questions
Breathing volume increases as player gets more tired 0 Answers
Beginners troubles with audiosource 0 Answers
Triggering multiple audio clips to play in sequence 1 Answer
Unitywebrequest returns fmod error 1 Answer
OnTriggerExit stop audio 1 Answer