Phaser3 Scene's Ready Event listener not invoked

Example Test Code

export class ResultScene extends BaseScene {
    constructor(){
        super(CONSTANT.SCENES.RESULT)
    }

    init(){
    }
    create() {

        this.events.on("ready", () => {
            this.markSceneAsActive();
        });
        this.events.on('shutdown ', (data)=>{
            console.log('shutdown ', data.config.key);
            this.events.removeAllListeners();
        })
    }
    preload(){

    }
}

When i start this scene or launch it from another Scene like this
this.scene.start(CONSTANT.SCENES.RESULTSCENE);
the markSceneAsActive function is not invoked.

:wave:

The READY event happens before scene create() or init() so the scene can’t really use it itself.

Another scene could add a READY listener before ResultScene starts. But if you just want to know if a scene is active you can check sys.settings.active.

This will break restarting the scene.