Pause- resume not working

Hello,
I am new in Phaser 3 and I am trying to pause the game to intro a dialogue and the restart the game where I paused it, but it is not working, this is my code:
this.time.addEvent({
delay: 15000,
callback: function () {
this.scene.pause();
this.scene.launch(‘DialogueBoss’);
const boss = new Boss(this);
boss.setScale(2.1);
if (boss != undefined) {
this.enemies.add(boss);
}
},
callbackScope: this
});

and then in the dialogue:
dialog
.on(‘button.click’, () => {
if(this.boss){
this.scene.stop();
this.scene.resume(this.nextScene);// where nextscene is the same scene I was playing
}
this.scene.start(this.nextScene);
})
.on(‘button.over’, ()=> {
button.getElement(‘background’).setStrokeStyle(1, 0xffffff);
})
.on(‘button.out’, ()=> {
button.getElement(‘background’).setStrokeStyle();
});

Hi,

this.scene.pause();
this.scene.launch(‘DialogueBoss’);

I’m not sure, but if you paused the scene, how the scene can launch something ?

I don’t use scene.pause so i can’t say if it’s doable, i pause the physics, anims and keyboard inputs instead.

Hey, thanks for your answer. I found the problem, was in the dialog logic, I missed one else statement. Now it is working fine. Answering you, I pause the current scene and then launch in parallel the dialog scene, after that scene is loaded and the button is clicked I stop it and resume the paused one. It works.

Interesting, thanks.