Closed erdostamasa closed 1 year ago
Hi @erdostamasa,
The fact that the "trigger transition from any" is not firing when the fsm is already in the target state is intentional. Your idea to use a second trigger transition that leads from your target state to itself again should work and will result in the OnEnter
method of the target state being called each time the trigger is activated :+1:.
Here's an example of what it could look like:
fsm.AddTriggerTransitionFromAny("OnMyTrigger", "A");
fsm.AddTriggerTransition("OnMyTrigger", "A", "A");
I have a TriggerTransitionFromAny and I've noticed that if I'm already in the target state, it's not working. I have code in the target state's OnEnter that I have to run each time the Transition fires.
Is it possible to have a trigger transition from the same state to itself?