ui_set_layout
Set UI control layout properties in a Godot scene, including anchor preset, position, size, and custom anchors.
Instructions
Set layout properties for a UI control.
Category: UI
Args: project_path: Path to the Godot project directory scene_path: Path to the scene file (relative to project) node_path: Path to the control node anchor_preset: Preset name (FullRect, CenterTop, Center, etc.) position: Position as JSON array [x, y] size: Size as JSON array [width, height] anchors: Custom anchors as JSON object {"left": 0, "top": 0, "right": 1, "bottom": 1}
Returns: Success message or error description
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": {
"project_path": "<project_path>",
"scene_path": "<scene_path>",
"node_path": "<node_path>"
},
"name": "ui_set_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| scene_path | Yes | ||
| node_path | Yes | ||
| anchor_preset | No | ||
| position | No | ||
| size | No | ||
| anchors | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |