add_bt_task_child
Add a leaf task such as Wait or MoveTo under a BehaviorTree composite, appending it to the parent's Children in execution order for data-only authoring.
Instructions
Add a leaf task node (Wait/MoveTo/PlaySound/RunBehavior/...) under a BehaviorTree composite. The task 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. Idempotent by child_name within the parent.
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 |
|---|---|---|---|
| child_name | No | Optional stable name for the new node; defaults to the task type. | |
| task_class | Yes | Concrete task class: "Wait" | "MoveTo" | "PlaySound" | "RunBehavior" | "FinishWithResult" (or a BTTask_* class name). | |
| parent_name | No | Optional parent composite name; "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). |