engine icon indicating copy to clipboard operation
engine copied to clipboard

Add init and configure event to AppBase

Open lucaheft opened this issue 1 month ago • 4 comments

Description

Adds 2 new generic events to AppBase

init -> Fired after AppBase.init configure -> Fired after successfull AppBase.configure

I've noticed, that there are no jsdocs for events in AppBase, if desired I can add those as well

If this gets merged we also want to reflect these changes on the developer site Application Lifecycle

Checklist

  • [x] I have read the contributing guidelines
  • [x] My code follows the project's coding standards
  • [x] This PR focuses on a single change

lucaheft avatar Nov 27 '25 10:11 lucaheft

configure - seems generic in this context. Like application is configured, but with what and by whom? Really it is something like: config:loaded because this is very specific to way Editor outputs the project and provides config.json with data in it. Engine only users usually don't use that approach. A bit more info in description of the event - will be useful.

Maksims avatar Nov 27 '25 11:11 Maksims

I see, not sure how to go forward with this. How about we only add init event for now?

lucaheft avatar Nov 27 '25 13:11 lucaheft

I see, not sure how to go forward with this. How about we only add init event for now?

I think if you name second event as config:loaded - should be fine.

Maksims avatar Nov 27 '25 14:11 Maksims

I just tried this out and it seems like when launching in the editor (use_local_engine), these events are not called. However when downloading they work correctly.

I guess there is some custom editor startup which doesn't call init and configure of the AppBase? This could be quite confusing for the user. Can this be changed in the editor, so the behaviour is similiar to the exported editor project?

In my test I subscribed to the events in the loadingscreen

lucaheft avatar Nov 28 '25 09:11 lucaheft