I'm seeing the following strange behavior:
1. I have an fsm attached to my GameObject. It is initially disabled when the program starts. 'Reset on Disable' is set to true. I have a custom FsmStateAction on one of my states with 'OnEnter' and 'OnExit' overridden.
2. After the program starts I enable my fsm. OnEnter is called.
3. Later, I disable my fsm. OnExit is called.
4. Still later, I enable my fsm again. OnExit is called a second time, and then OnEnter is called.
So why is OnExit being called again in Step #4? It really messes up my game logic. Is there any good way to detect whether the call is happening the second time so I can filter it out?
Btw, my fsm is basically a subfsm within a larger state machine. It's enabled / disabled with the EnableFSM action.