Hello guys, in my game i am using System -> on start of layout and then audio -> play for my soundtrack, but when the player loses i call system -> restart layout which restarts my soundtrack as well. Does anyone knows how can i make audio playback persist?
Develop games in your browser. Powerful, performant & highly capable.
Your game does exactly what you tell it to do. It plays the music on start of the layout as it should.
What I would do is have two layouts, for example : "Title Screen" and "Play Screen". In title screen, you play your music at the start of the layout, but in your "Play Screen", you do nothing. This way, when the "Play screen" layout is restarted, the music will keep playing without restarting.
I hope it helps