Sorry I didn't explicitly mention, I was running Start( ) in every case. But I have since found a workaround:
It feels like some weird technicality, but it works!
It seems that the way you programatically "Reset" an FSM which does not "Reset on Disable", AND is Finished via FinishFSM ([fsmComponent].Fsm.Finished==true), is to:
- Temporarily enable its "[fsmComponent].Fsm.RestartOnEnable" flag
- Enable the FSM by "[fsmComponent].enabled = true"
- Stop the FSM by "[fsmComponent].Fsm.Stop( )"
- Start the FSM by "[fsmComponent].Fsm.Start( )"
- Restore the previous value for the "[fsmComponent].Fsm.RestartOnEnable" flag.
That was fun. Hope this saves anyone the hours it took me to figure out by trial and error.
Edit:Only Fsm.Stop( ) cares about the RestartOnEnable flag. So enable can happen after the flag is reverted, and hence, the entire sure-resetting mechanism is just:
- Temporarily enable its "[fsmComponent].Fsm.RestartOnEnable" flag
- Stop the FSM by "[fsmComponent].Fsm.Stop( )"
- Restore the previous value for the "[fsmComponent].Fsm.RestartOnEnable" flag.