I found a bug with the EndAction(null) EndAction(true/false) and the latch feature.
I think you can repro this, but it’s frame perfect, you need a parallel task :
And an action which call EndAction from outside of Graph execution. Mine is something like this :
You can detect and error if you enter/exit a SubFSM you will sometime not Execute Action in the Parallel Node. In fact if you EndAction(true/false) right before and at the same frame than your End(null) you will encounter the problem (?) .
My solution was to add “latch = false” if we call EndAction(null) after an EndAction(true/false).
Oh yeah the screen shot bugged. This is my solution on screenshot.
In fact if for some reason you call EndAction(true) -> EndAction(null) during the same “frame” the behaviour will not be the same as EndAction(null) -> EndAction(true). In the first case, the latch will be called after, and in my situation the action will be skipped (because of the latch) for the next time I call it.
In my case I was executing action in parallel on a subFSM and stopping them outside of NodeCanvas (in a callback), and the behaviour was all wrong with entering/exiting the subFSM.
Thank you for the follow up and explanation. This is a super edge case for sure 🙂
I don’t see any problems with the code change you’ve made really, but I will have to test further to be sure before adding it officially. Is everything else working as expected and as it were for you after making this change?