Hi, we’re having an issue with the way State Tree Event Transitions are ordered.
When two events are sent to a StateTreeComponent on the same frame, which each trigger a transition on different states, by default the most-derived (most childish?) state transition will be applied, and the transition for the parent state will be ignored.
For instance, in a state tree like this:
Where A has an Event Transition like this:
And A_A has one like this:
And we send the events like this:
…then the event with `Test.StateTree.Tag` will be ignored, even though it was sent before the event with `Test.StateTree.Tag2`.
This is a problem for us because in our project, state tree events can be sent at any time by overlapping systems, and to have an event ignored causes surprising bugs.
I know that there is a “Priority” feature on transitions which can spot-fix some cases of this, but given the wide variety of events and timing, that’s not a scalable solution. What we need is for events transitions to be processed in order of event arrival.
I also personally find it counterintuitive that by default the child state transition has higher priority than the parent state transition. That’s the opposite of what we expect in the StateTrees that we’ve built so far, and we’ve been working around this issue by making parent state transitions all have higher priority than their child states’ transitions.
So my questions:
Is there any way to change this behavior? Is there a way to make all event transitions be processed, even for multiple events arriving on the same frame?
Or, failing that, is there a way to reverse the default priority, allowing parent state transitions to have priority over their child states transitions?




