Full restart a tree

Alex Jr

New member
Hello :3, i hope someone can help me with my problem, is there a way to full restart a tree?
I have some external behaviors and and i want to remove them when i restart the tree (so the bt create again the nodes because i change the external tree by code) but the Reset dosent work for this
 
External trees are loaded at runtime and they are persisted when the tree restarts. In order to get around this you will need to save you current tree to an external tree and then assign the External Tree reference to the Behavior Tree component. In order to have it reload the tree you can swap out the external tree to null and then back to the original value again. This will allow the Get External Behavior task to retrieve the results again. Here are some similar posts:


As a side note I know that this is convoluted and in the DOTS version of Behavior Designer you will be able to just call a single method to reevaluate the external trees (now called subtrees).
 
Back
Top