public sealed class RunSubtreeDynamicTaskRuns the tree a key names, as a task of the tree it is in.
Remarks
The dynamic half of doc 37 § Part 3's subtree pair. The static half is not a task at all at run time — BehaviorTreeCompiler splices a named subtree into the parent's flat array, so pre-order still equals priority across the boundary and a decorator above can abort a branch below.
⚠ This one cannot be spliced, and pays for it. A tree named by a key is not known until the agent runs, so it gets an instance of its own: its own memory block, its own observers, its own active node. The parent tree can abort the whole of it and can see nothing inside it, which is the honest cost of choosing a tree at run time.
Fields and properties (1)
public static int StateSizeHow many bytes it needs: the node it was started on.
Methods (5)
public RunSubtreeDynamicTask(BlackboardKey key, BehaviorTreeLibrary library)Runs the tree a key names, as a task of the tree it is in.
public BehaviorTreeTemplate? Resolve(in AgentContext context)Which tree to run, given the agent.
public void Start(in AgentContext context, Span<byte> state)Begins. Called once before the first Tick, on a zeroed span.
public ActionStatus Tick(in AgentContext context, Span<byte> state, float delta)Advances it.
public void Abort(in AgentContext context, Span<byte> state)Stops it early. The span is zeroed afterwards; this is for what is outside it.
Used by (2)
- BehaviorTreeTaskTestsVixen.Ai.Tests
- BuildStateVixen.Ai