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 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)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
213 People are following this question.
Unity jump from one canvas scene to another scene with canvas
Problem with Strings updatings on Gui
Load a Scene and have the player be move to a specific location
2K screen resolution problem
Script Error: OnCollisionEnter2D