Music playing from 2 different scenes - how to fix?
Hey guys. I've got a main menu, and a level 1. Both have a camera each with a song selected on the GUI as Audio Source. They are both set to 'Play on awake'.
Under build settings main menu is at the top, and level 1 just below it. When I run the project, both scenes' music are playing. When I click 'new game' (to launch Level1) the MainMenu's music stops, and the Level1 song plays.
Unfortunately when I untick Level1's 'Play on awake', then the MainMenu's music is playing fine, but I get no sound from Level1. How can I get them both to play as intended (when the scene is loaded)?
Why is it playing music from Level1 automatically (even though the MainMenu scene is the only one loaded)? I'm still a beginner, so it's probably just something simple. Any help appreciated, thanks in advance.
to understand correctly. without any LoadLevel or LoadLevelAsync calls in your project, your start the main menu and you hear both music's playing?
and you've checked the hierarchy for available gameobjects during play, that could play that music?
Thanks for the quick reply hexagonius. Yeah I only have 2 audio sources - the 2 cameras. 1 camera in each scene :-(
what happens when you type AudioSource into your hierarchy search bar during play?
Answer by spykerwolf · Mar 21, 2017 at 10:27 PM
I knew it was something easy! Had to unload the Level1 scene (I had both MainMenu and Level1 loaded). It's working 100% now :0)
Hello, can i ask you how do you unload a scene? I seem to have the same problem as you were having.
Your answer
Follow this Question
Related Questions
Unity jump from one canvas scene to another scene with canvas 2 Answers
2K screen resolution problem 0 Answers
Script Error: OnCollisionEnter2D 1 Answer
How do I create a 2D Seamless World Map? 1 Answer
Problem with Strings updatings on Gui 0 Answers