MelonLoader

MelonLoader

242 Downloads

OnApplicationLateStart running too Early on some Mono Games

HerpDerpinstine opened this issue · 6 comments

commented

As the title suggests OnApplicationStart can run too Early on some Mono Games.
This causes unintended behavior for things like GameObjects when instantiated from OnApplicationStart.
Resulting in it ignoring DontDestroyOnLoad or hideFlags, hideFlags causing components not to run, the GameObject getting destroyed on first Scene Load, etc.

commented

Cant this simply be fixed by invoking the callback when MLs component receives the Start message?

commented

Cant this simply be fixed by invoking the callback when MLs component receives the Start message?

Possibly not entirely sure.

commented

Cant this simply be fixed by invoking the callback when MLs component receives the Start message?

Possibly not entirely sure.

When is it called atm?

commented

Cant this simply be fixed by invoking the callback when MLs component receives the Start message?

Possibly not entirely sure.

When is it called atm?

Inside Core’s Start which gets called by a runtime invoke hook
Delaying it a little more using the component might be viable

commented

Cant this simply be fixed by invoking the callback when MLs component receives the Start message?

Possibly not entirely sure.

When is it called atm?

Inside Core’s Start which gets called by a runtime invoke hook Delaying it a little more using the component might be viable

imo OnApplicationStart should become obsolete and OnStart should be added

commented

OnApplicationLateStart is now be running from the Support Module Component's OnStart method.