add_button_to_widget
Add a button to a Widget Blueprint, setting its label, position, size, font, and colors. Simplifies UI creation in Unreal Editor.
Instructions
Add a Button to a Widget Blueprint.
Args: widget_name: Widget Blueprint name button_name: Component name for the button text: Button label position: [X, Y] canvas position size: [Width, Height] font_size: Font size color: [R,G,B,A] text color background_color: [R,G,B,A] button background color
KB: see knowledge_base/06_UI_UMG_SYSTEMS.md#overview Example: add_button_to_widget(widget_name="/Game/MCP_Test/WBP_Example", button_name="ExampleName")
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": {
"widget_name": "<widget_name>",
"button_name": "<button_name>"
},
"name": "add_button_to_widget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| text | No | ||
| color | No | ||
| position | No | ||
| font_size | No | ||
| button_name | Yes | ||
| widget_name | Yes | ||
| background_color | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |