- Home /
Wanting SFX to overlap background Audio (overlapping Audio)
I'm unsure how to fix this one. I've looked up many other forums on overlapping audio help and I'm unsure what to do.
In my game I have some background music for the level but also when my lasergun shoots the audio for the laser cuts the music and half and the background Audio stops playing.
I've tried putting the laser sound at 1 priority and the background music on full priority. I've dabbled with the 2D/3D sounds (though I'm unsure what that does), and I don't know how it's possible to just have both sounds playing at the same time.
The Audio listener is attached to the main camera (it's a first person shooter), the gun holds the laser sound and the first person player holds the gamelevelmusic sound.
They're both audio.PlayOneShot(musichere); and the background music plays in the start function in the first person shooter while the laser sound is played after the "fire" function in the shoot script. (It's extremely simple scripts I don't think it's worth it to post it here)
Try attaching another audio source to your main camera, and add the audio to it. 1. Uncheck Playonawake 2. Uncheck Loop add the audiosource to your script and audio.Play().Better don't call this line in Update. If you are placing this line in Update. use a flag variable and break the loop once it is called.
Your answer
Follow this Question
Related Questions
How to STOP music when loading a SPECIFIC SCENE? 3 Answers
Why is my backtrack's volume getting lower? 0 Answers
Getting beats from a song using frequency range 1 Answer
Music Zones play music with tags? 0 Answers
AudioSource.Pause not working? 3 Answers