Bug in SceneManager.run?

I think I may have found a bug in the function SceneManager.run().

If the scene is paused, scene.sys.resume() is not called because the “else if” branch is malformed. Instead of the first condition before the AND being “scene.sys.isBooted”, shouldn’t it be “scene.sys.settings.isBooted”? As it is, the expression evaluates to undefined, which means false, so that branch of the conditional is never taken, so “this.start” is called instead, resulting in the scene’s create function being called again.

I’m using Phaser 3.19.0. Could someone please check this for me? Thanks in advance!

1 Like

I just tried editing phaser.js to make the change I suggested, but now the scene isn’t starting at all. What’s happening now is that the scene in question is ALWAYS taking that “else if” branch, because (a) scene.sys.settings.isBooted is true, and (b) scene.sys.settings.isActive() returns false.

In light of this discovery, I would suggest that the scene’s isPaused function or status number be used in this branch of the conditional, rather than what’s there.

Does anyone agree with me?

1 Like

Yes. I think the correct test should be scene.sys.isPaused().

You could add an issue or a PR.

I don’t know how to add an issue or a PR. How would I do that?

Are you on GitHub? https://github.com/photonstorm/phaser

If not I can do it.

I’m on GitHub, so I can do it. Thank you!

1 Like