You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
The engine's lifecycle hooks should be uniformized, instead of each domain having a set of hooks specific to it.
Motivation
Right now, each domain (app, screen, scene manager) has its own set of lifecycle hooks(app and screen have onDispose, onSetup, while scene manager has onEnter, onExit). For end users, this can result in an unnecessary cognitive load.
Proposed Solution
To reduce the cognitive load, lifecycle hooks should be uniformized, into the following order:
onEnter -> setup logic
onUpdate -> iterative logic
onExit -> cleanup logic
Note
Each domain can also have specific hooks, such as onReady for scene manager, onPhysicsUpdate for nodes, onActive/onInactive for screens/apps.
Summary
The engine's lifecycle hooks should be uniformized, instead of each domain having a set of hooks specific to it.
Motivation
Right now, each domain (app, screen, scene manager) has its own set of lifecycle hooks(app and screen have onDispose, onSetup, while scene manager has onEnter, onExit). For end users, this can result in an unnecessary cognitive load.
Proposed Solution
To reduce the cognitive load, lifecycle hooks should be uniformized, into the following order:
Note
Each domain can also have specific hooks, such as onReady for scene manager, onPhysicsUpdate for nodes, onActive/onInactive for screens/apps.