add_component
Attach a component to an actor at runtime, optionally socketed and transformed relative to a parent component.
Instructions
Attach a component (UActorComponent or USceneComponent subclass) to an existing actor at runtime, optionally socketed and transformed relative to a parent component.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"actor_name": "<actor_name>",
"class_path": "<class_path>"
},
"name": "add_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Host actor label or FName. | |
| class_path | Yes | Component class path, e.g. /Script/Engine.StaticMeshComponent, /Script/Engine.PointLightComponent. | |
| component_name | No | FName for the new component; defaults to UE auto-naming. | |
| attach_to | No | Existing component name to attach as child of; defaults to root component. | |
| socket | No | Socket name on the parent component. | |
| relative_transform | No | {location, rotation, scale} relative to the parent component. |