UnityHFSM icon indicating copy to clipboard operation
UnityHFSM copied to clipboard

Pending transitions causing problems

Open lucypero opened this issue 8 months ago • 1 comments

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.

lucypero avatar Apr 03 '25 15:04 lucypero

If think I have the same issue. Do you have an example to reproduce the bug ?

Renardjojo avatar Aug 09 '25 11:08 Renardjojo