As mentioned on discord, ConditionTasks are currently not working 100% as when using in a BehaviorTree, OnEnable / OnDisable are not getting called
The ideal behavior for my use case would be to call them when the graph starts and stops, so that I could do things like reference events on other components, etc
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).
Hey that sounds great! Honestly, OnGraphStarted and OnGraphStopped would probably work better for events then OnEnable / OnDisable but that could just be because I’m not 100% familiar with the difference between resting and active
However at least having the callbacks at some point will allow our nodes to work so I greatly appreciate it!