I want to execute dynamically behavior trees. I wanted to use the function PushInstance like its done in UBTTask_RunBehavior. But I can’t access the function since its protected. Is there a reason it is protected or is there another way to execute behavior trees dynamically?
sorry I meant like executing a subtree from my behavior tree. I wanted to write my own RunBehavior-Task to change the executed behavior tree during runtime because the RunBehavior-Task can only be set up once in the behavior tree and its not changable during runtime. But when I use AAIController::RunBehaviorTree it it will be executed in a loop and I don’t get back to the parent behavior tree, also if the execution failed.
I hope now it is better to understand what I want.
I suggest you derived from UBTTask_RunBehavior and override UBTTask_RunBehavior::ExecuteTask to set BehaviorAsset to whatever you want before calling Super::ExecuteTask. That should work
sorry for being annoying. I tried that before and tried it again but I get an unresolved external symbol error if I try to override the ExecuteTask function from RunBehavior.