Reply To: [Bug] Graphs are not fully reset when Stoping and Starting again

NodeCanvas Forums Support [Bug] Graphs are not fully reset when Stoping and Starting again Reply To: [Bug] Graphs are not fully reset when Stoping and Starting again

#15112
Gavalakis
Keymaster

Hello there,

Thank you for the details of reproduction. Stoping the graph from within its own execution is indeed a bit problematic. To make this work, please change your action code to call EndAction(null) instead.

EndAction(null) is used when we want to interrupt the action irrelevant of success or failure (which is relevant to this case since we stop the graph right after anyways), and will make the action completely reset to Resting.

You will still need to yield 1 frame just like you said before re-starting the graph in the onFinish callback (although I am looking into this and how to avoid this requirement).

Please let me know if the above change works for you.

Thank you!

Join us on Discord: https://discord.gg/97q2Rjh