Necronomison
New member
Hey there!
Following on this solution:
www.opsive.com
I successfuly made a custom task (subclassing BehaviorReference) so I can reference subtrees via SharedExternalBehavior[] instead of the built-in externalBehaviors array. Runtime works: GetExternalBehaviors() returns the correct ExternalBehavior assets.
But in the Behavior Designer editor, I lose the usual UX: when I double‑click the task node, it does not open the referenced/nested external tree. The built-in BehaviorTreeReference works fine, and it also works if I manually put the subtrees into the parent external tree asset’s “global external behaviors” list.
But my goal is the opposite: have the parent tree be an external reference reused everywhere (set on the BehaviorTree component), and have its nested references resolved through shared variables.
So basically my set up is like this:
1. One parent external behavior tree asset (A)
2. One sub/child external behavior tree asset (B)
3. In the parent asset (A), I've created a global SharedExternalBehavior variable, and my custom BehaviorReference class references it.
4. On the actual game object with the BehaviorTree monobehavior, I've added A as it's external tree
5. On the MonoBehavior, I've referenced B into the global variable slot defined by A
Is there a supported way to make the editor’s “open referenced tree” feature work with shared-variable-based external behavior references, or to hook/customize what asset the node opens on double-click?
Following on this solution:
Feature Request for Behavior Tree Reference Task
Hello Opsive, I've been using Behavior Designer extensively over the past months. I had an ecstasy when I discovered the power of behavior tree references. Unfortunately, I can't reference a behavior variable within a "Behavior Tree Refence" task. That would have been awesome to have since I am...
I successfuly made a custom task (subclassing BehaviorReference) so I can reference subtrees via SharedExternalBehavior[] instead of the built-in externalBehaviors array. Runtime works: GetExternalBehaviors() returns the correct ExternalBehavior assets.
But in the Behavior Designer editor, I lose the usual UX: when I double‑click the task node, it does not open the referenced/nested external tree. The built-in BehaviorTreeReference works fine, and it also works if I manually put the subtrees into the parent external tree asset’s “global external behaviors” list.
But my goal is the opposite: have the parent tree be an external reference reused everywhere (set on the BehaviorTree component), and have its nested references resolved through shared variables.
So basically my set up is like this:
1. One parent external behavior tree asset (A)
2. One sub/child external behavior tree asset (B)
3. In the parent asset (A), I've created a global SharedExternalBehavior variable, and my custom BehaviorReference class references it.
4. On the actual game object with the BehaviorTree monobehavior, I've added A as it's external tree
5. On the MonoBehavior, I've referenced B into the global variable slot defined by A
Is there a supported way to make the editor’s “open referenced tree” feature work with shared-variable-based external behavior references, or to hook/customize what asset the node opens on double-click?