Closed se-m closed 6 years ago
@se-m By design, a normal handler in a state will not fire before the _onEnter
for that state does - this is intentional. If you have conditional logic resulting in a need to fire a handler before the same state's _onEnter
, that's likely an indicator that you need to move all of that into separate handlers and branch that way.
Hi. I have wrote some code to find out hander priority during the transition. My test code
Script out is
Problem that is unable to overpass code in _onEnter.
Out should be
First handlers in deferUntilTransition, then _onEnter, last others. I.e. normal event queue. Pure example when need to overpass _onEnter
In my case i was needed to overpass _onEnter code in state_3 when error throwed in state_1, but state_2 must do his job in-beetween state_3 and state_1. Yes, weird and complicated.