Reply To: Feature Request: Call OnEnable / OnDisable on ConditionTasks in BTs

NodeCanvas Forums Support Feature Request: Call OnEnable / OnDisable on ConditionTasks in BTs Reply To: Feature Request: Call OnEnable / OnDisable on ConditionTasks in BTs

#14524
Gavalakis
Keymaster

Hello there.

Based on some other people request as well, I’ve decided to make the OnEnable and OnDisable be called for conditions in Behaviour Trees, but not OnGraphStart and OnGraphStop.

OnEnable is called when the BT node was Resting and is now active.
OnDisable is called when the BT node is reset back to Resting.

This keeps the calls more consistent with when those calls are made in the FSM context and also make certain ConditionTasks (like Timeout) work in BTs correctly as well now.

I believe that for usage with Events, the way OnEnable and OnDisable calls are made now will work fine.
If the moment these are called do not work for you, I am also looking into adding callbacks in tasks (both ActionTask and ConditionTask) for when the graph is started (OnGraphStarted) as well as when it is stopped (OnGraphStopped).

Let me know what you think.
Thank you!

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