How to start new scene when the game is paused?

Hello
I have three scenes
scene A, scene B, sceneC

In scene A pause the game

this.input.keyboard.on('keydown-P', function (event) {
 this.scene.launch('sceneB')
 this.scene.pause();
}, this);

In sceneB ,Stop paused and return to sceneA:

// Resume the Game
this.input.keyboard.on('keydown-P', function (event) {
 this.scene.stop();
  this.scene.resume('sceneA');
}, this);

But I have no idea how to go to sceneC , when I in the sceneB.

//go to Scene C
this.input.keyboard.on('keydown-R', function (event) {
  this.scene.start('sceneC');
}, this);

Does anyone know how to start a new scene when the game is paused??
Thank you very much

You can use this.scene.start(sceneKey); in Scene A

this.input.keyboard.on('keydown-P', function (event) {
 this.scene.launch('sceneB')
 this.scene.pause();
 this.scene.start('newScene');
}, this);

This should work, as long as it’s in sceneB. It doesn’t matter that sceneA is paused.

What happens?

Like samme said, you can just put your input that transitions to sceneC in both sceneA and sceneB, and that should work alright.

You could also run a scene in parallel in the background to handle your scene-switching inputs, and use that scene to start and stop the other scenes, kind of like a ‘parent’ scene. If you use scene.launch(‘sceneName’) instead of scene.start(‘sceneName’), the scene that called scene.launch won’t automatically stop and the newly-launched scene will run in parallel with the first one.