- Home /
Background music and button sound at the same time PROBLEM
Hello i have a intro with background music at the start of my game and when they come to the menu the background music still plays but i also have button sound on my menu so if someone clicks a button it should come a sound but it doesent, and i have 2 audiolisteners so thats the problem i need help for, and if i disable the audiolisteners that the background music is in the button sound work but not the background music :S sorry for my bad english and i hope someone understand and can help me :)
You may need to change the priorities of the sound. If they are all set to default they will fight between themselves.
I'm a little confused. You should ALWAYS have only one audio listener. (Did you mean audio source?)
No i mean audio listener i have 1 listener in the gameObject where my background music are, and 1 listener in the gameObject where the button sound are, and the reason why i dont add the Background music to the button sound gameObject are that i have 1 scene with my starting intro and when its finish it goes to the main menu and i have coded so the gameObject doesent destroy on level loading so then i end up with 2 listeners :p
Answer by oferei · Sep 03, 2013 at 01:11 PM
I think your problem is with multiple audio listeners. You should only have one.
Other suggestions:
Place the audio listener on the camera in the 1st scene and mark the camera as do-not-destroy
Keep the audio sources close to the camera to make sure they're audible. You can attach them to the camera if the camera is mobile
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How To play sound with a keypress 2 Answers
fix sonic like script? 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
listeners not working on dont destroy on load object 0 Answers