Issue transitioning between scenes with a button

Arrow functions do not have a scope of their own, so providing one in the event listener is not necessary. What’s more, if this was a problem with the function’s scope, you would probably have gotten an error. If this were the game instance, the old scene would not be stopped.

I don’t know what’s causing this. Changing the scene from a pointerdown event works fine in the Changing Scene example, even if it’s modified with the exact code you provided. Can you try reproducing this issue outside of your game (for instance, in an example)?

You can run game.scene.getScene('final').sys.isActive() from your browser’s console (replace game with a reference to your Phaser.Game instance) to check if the scene is running. The value of game.scene.getScene('final').sys.settings.status could also help determine what the scene is doing. By the way, which version of Phaser are you using? A problem with the particular version might be causing this, even though I can’t remember any issues related to this. I’ve tested it with 3.17 (the version in the example runner) and 3.19.

2 Likes