add_bt_composite_child
Adds a child composite (Selector, Sequence, or SimpleParallel) under a BehaviorTree parent composite in Unreal Engine, appending it to the execution order for AI behavior authoring.
Instructions
Add a child composite (Selector/Sequence/SimpleParallel) under a BehaviorTree composite. The child is appended to the parent's Children (array order = execution order). Authoring is data-only: ParentNode/ExecutionIndex are assigned by the BT runtime at load (run_behavior_tree). Idempotent by child_name within the parent. The returned child_name is how you address this composite as a parent for further children.
Returns: { behavior_tree_path: string, parent_name: string, child_name: string, child_class: string, child_kind: string, already_exists: bool, child_count: int, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| composite | Yes | Concrete composite class: "Selector" | "Sequence" | "SimpleParallel" (or a BTComposite_* class name). | |
| child_name | No | Optional stable name for the new node (its identity for idempotency/addressing); defaults to the composite type. | |
| parent_name | No | Optional parent composite name (a child_name from a prior add); "Root" or omitted targets the RootNode. | |
| behavior_tree_path | Yes | Path to the UBehaviorTree asset (its RootNode must already be set via set_behavior_tree_root). |