What problem does this solve or what need does it fill?
Currently OnExit and OnEnter aren't ordered in relation to the state dependency graph.
This is a problem when parent state transition prepares e.g. resources for substates, but the OnEnter(Substate) runs first.
What solution would you like?
- Order
OnExit to run from graph leaf-states to root-states.
- Keep
OnTransition in arbitrary order.
- Order
OnEnter to run from graph root-states to leaf-states.
This can either be done by adding after conditions during state installation or as part of StateRegistry, a separate feature.
What alternative(s) have you considered?
None that seem reasonable.
Additional context
This could be considered a bug to some degree.
Working example, entering Settings will crash or not, depending on the system order that was decided during startup.
What problem does this solve or what need does it fill?
Currently
OnExitandOnEnteraren't ordered in relation to the state dependency graph.This is a problem when parent state transition prepares e.g. resources for substates, but the
OnEnter(Substate)runs first.What solution would you like?
OnExitto run from graph leaf-states to root-states.OnTransitionin arbitrary order.OnEnterto run from graph root-states to leaf-states.This can either be done by adding
afterconditions during state installation or as part ofStateRegistry, a separate feature.What alternative(s) have you considered?
None that seem reasonable.
Additional context
This could be considered a bug to some degree.
Working example, entering
Settingswill crash or not, depending on the system order that was decided during startup.