remove_bt_composite_child
Remove a composite child (Selector, Sequence, etc.) from a Behavior Tree parent by child name or index, deleting its edge from the Children array. Returns removed:false if already absent.
Instructions
Remove a child composite (Selector/Sequence/...) from a BehaviorTree composite. Inverse of add_bt_composite_child: drops the matching entry from the parent's Children array. Only composite child-edges are considered, so a task with the same name is untouched. Idempotent: a missing child returns removed:false / already_absent:true.
Returns: { behavior_tree_path: string, parent_name: string, child_name: string, child_kind: string, removed: bool, already_absent: bool, child_count: int, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Alternative to child_name: 0-based position in the parent's Children array (the edge at that index must be a composite). | |
| child_name | No | Name of the composite child to remove (a child_name from a prior add_bt_composite_child); provide this or 'index'. | |
| parent_name | No | Optional parent composite name owning the child; "Root" or omitted targets the RootNode. | |
| behavior_tree_path | Yes | Path to the UBehaviorTree asset. |