UnityHFSM
UnityHFSM copied to clipboard
Pending transitions causing problems
I stumbled upon a case where pending transitions are a problem for me. As state A requests to exit with fsm.StateCanExit();, the FSM switches to the wrong state because of a pending transition. The condition for the pending transition is outdated, so it switches to the wrong state. It gets outdated because state A modifies the state that the condition is testing right before calling fsm.StateCanExit(), but the condition still triggers because it's "pending".
I could add extra checks to the transition but I was wondering if there's a better way to avoid this issue.
If think I have the same issue. Do you have an example to reproduce the bug ?