Indeed, the OnEnable and OnDisable methods are not used in Behaviour Trees but rather only in StateMachines, because there is not a very specific timing where a condition task is considered Enabled or Disabled in the context of a BT. With that said, other people have suggested that OnEnable is called once when the BT starts, and OnDisable be called once when the BT Stops, and this is something I am actually going to add. This however does not really solve the issue with Timeout, but I believe that Timeout could be implemented differently to avoid the requirement of OnEnable and OnDisable (I will need to think about how though).
Once again the issue here, is determining when OnEnable and OnDisable actually take place in the context of BTs for condition tasks. For FSMs it’s easy to determine the timing, but not as such in BT. If you have any suggestions at all in this matter, by all means, please do let me know!
Thank you in advance!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.