add_bt_service
Attach a background tick service to a BehaviorTree composite node in Unreal Engine so it runs only while that branch is active. Idempotent by service name within the composite.
Instructions
Attach a service (background tick) to a BehaviorTree composite. The service is appended to the composite's Services array and ticks while that composite branch is active. Authoring is data-only: ParentNode/ExecutionIndex are assigned by the BT runtime at load (run_behavior_tree). Idempotent by service_name within the composite.
Returns: { behavior_tree_path: string, parent_name: string, service_name: string, service_class: string, already_exists: bool, service_count: int, saved: bool, save_error?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_name | No | Optional composite name to attach the service to; "Root" or omitted targets the RootNode. | |
| service_name | No | Optional stable name for the new service (its identity for idempotency); defaults to the service type. | |
| service_class | Yes | Concrete service class: "DefaultFocus" | "RunEQS" | ... (or a BTService_* class name). | |
| behavior_tree_path | Yes | Path to the UBehaviorTree asset (its RootNode must already be set via set_behavior_tree_root). |