- Home /
Play again music problem. (Please help) :)
So I am making a mobile game. When player loses and goes to "Game Over" scene Music stops playing(that's not the problem), but In the Game Over scene there are 2 buttons:"Go to menu" and "play again!". My music starts in the menu and I have DontDestroyOnLoad in it. I have problem with "Play Again!" button, because if player doesn't go trough menu he/she doesn't have music on. So could someone tell me how to fix that. :) Ask me more if you didn't get my text, thanks!
It's difficult to answer without a little more detail on your architecture.
Do you have a Game$$anonymous$$anager class for example? If so, is it a Singleton with DontDestroyOnLoad or a Static Class? Where did you put the Play/Pause etc. mechanics?
I have music gameobject and inside it there is DoNotDestroyOnLoad C# Script and the music. Play button plays the level not the music. If you tell me how to post screenshot i can post one :D
There's an image icon in the text editor toolbar ;)
Regarding your music implementation, is the AudioSource set as PlayOnAwake ?