The event "initialization" and the application lifecycle

As it is known, various events are called during one frame (application lifecycle), but in a specific order. Here are some of them:

  • initialization
  • postInitialization
  • fixedUpdate
  • update
  • postUpdate

We can subscribe to them like this:

this.app.on('update', function () { console.log('[test] update'); });
this.app.on('initialize', function () { console.log('[test] initialize'); });

But initialize is called only once. However, I need to track its execution every frame, every application lifecycle. How can this be implemented?

The application fires this event only one time, when the application starts, so I’m not sure what you’re after.

Yes, it doesn’t seem to make sense. Topic can be deleted or closed.

1 Like