Difference between ticking a tree and using BehaviorTree.Start()

RedhookDana

New member
Hi,
I am using Behavior Designer in a turn-based manner. I had assumed initially that ticking the tree would essentially cause it to re-evaluate but it looks like that any success/failures from the node evaluations persist per tick. So I tried using BehaviorTree.Start() instead and that seems to cause the tree to properly 'restart' which I guess sounds more intuitive than I expected.

What's going on here?
 
You don't want to manually call BehaviorTree.Start - it will be started automatically if enabled within the Behavior Tree component. If you want to restart it from the beginning every tick you should either ensure you have no tasks that return a status of running or call BehaviorTree.DisableBehavior then BehaviorTree.EnableBehavior.
 
Yeah there's no risk of having things running as this isn't real time but it's good to know disable/enable is better than doing a Start.
What is the risk of doing a Start manually?

I'll try enable/disable shortly. Thanks.
 
Top