You can simply call “StartBehaviour()” on the BehaviourTreeOwner to restart the owner’s assigned BehaviourTree.
Also, if the “repeat” property is checked in the BehaviourTreeOwner inspector, the behaviour will always automatically repeat without having to manually restart it, if that is what you are after by any chance.
Can you call StartBehaviour on a subtree node to reset? I noticed that swapping out BT’s in a subtree’s BT slot does not restart, but rather resumes execution from where it last was working.
StartBehaviour can’t be called on SubTrees, no, but SubTrees should reset when the SubTree NODE (that has the reference to the actual SubTree asset) is reset, which is usually done just after an evaluation cycle/tick of the parent tree.
Are you by any chance, swap the target SubTree by using a blackboard variable or manually, and doing so *while* the subtree is already running?
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.