Inactive scene is updated after transition complete

version : 3.52.0

Hi,

I tried to use scene Transition and I found inactive scene was updated after shutdown (only once).

I’m not familiar with Phaser, system.sceneUpdate.call seems to be called after scenePlugin.transitionComplete.

// Scene.System
step: function (time, delta)
{
  var events = this.events;

  events.emit(Events.PRE_UPDATE, time, delta);

  // 'scenePlugin.transitionComplete' is called and scene will be inactive
  events.emit(Events.UPDATE, time, delta);

  // update inactive scene
  this.sceneUpdate.call(this.scene, time, delta);

  events.emit(Events.POST_UPDATE, time, delta);
},

Transition was started as following…

// from : scene.system.settings{active: true,  status: 5 ...}
// to   : scene.system.settings{active: false, status: 1 ...}
 
this.scene.transition({
  target: 'anotherScene',
  duration: 2000,
  remove: false,
  allowInput: false,
  onUpdate: (progress: number]) => {
    console.log(`transition: ${progress}`);
  }
});

I didn’t know if I should write it in the issue, so I wrote it here.

thanks.

I guess it’s a bug. It looks like POST_UPDATE would fire once afterwards as well.

1 Like

I reported it on github.

thank you for your replying!