– start node of the FSM is linked only from the “ANY STATE”
– start node has no outgoing transitions (not even disabled ones, see workaround below)
Repro:
– create a FSM satisfying the conditions above
– start the scene
Expected:
– the FSM is started and playing
Observed:
– the FSM is stopped
– manually starting the FSM via the “Play” button has no effect
– no error message in console
Bug has been confirmed with your team via Discord, it’s apparently an unintended side effect of the FSM stopping itself when no more valid transitions are possible.
WORKAROUND:
– add an outgoing transition from the start state to a new state, and disable it.
Just to clarify, please note that the normal behavior is that the FSM will STOP if the FSM ends up on a Finished State without any outgoing Transitions AND there are also no other “Running” nodes like an AnyState or a ConcurrentState.
With that said you’ve come across quite an edge case here in regards to order of execution. I’ve just fixed this for the next version. To fix this on your end meanwhile, please open up FSM.cs and change the contents of methods OnGraphUpdate to be like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
protectedoverride voidOnGraphUpdate(){
if(currentState!=null){
//Update defer updatables (basically AnyStates and ConcurentStates)