so I am working on a pause menu and I have read that the scene under the overlay is still active unless coded otherwise by building in an “if paused then…”
I have also realized that even though the original scene is still active, you cannot access any variables on the original scene.
this poses 2 problems for me.
On the pause screen I have the option to quit the level, so I would need to use composer.removeScene for the original scene, but I need to put in a specific scene name. right now it looks like this composer.removeScene(“Scripts.cave”) and since I am using a universal pause menu for all levels, that currently only works on the one level “Scripts.cave”
composer.removeScene("Scripts.cave")
does anyone have a tip on how to create a variable I can plug in that would read what scene im on and be able to removeScene. I would like it to be something like this
composer.removeScene(currentScene)
Im not sure how I would get the overlay to know what scene it is covering.
Second question would fall in line with the first with the idea of the overlay needing to know/access the original scene.
On the pause menu I also have a “resume” button, so I would need the resume button to be able to change the “if paused then…” that would be on the original scene, in order turn paused to False and allow play to resume.
Thanks for any help