cocos_add_uitransform
Add a UI transform component to Cocos Creator nodes to enable UI rendering by specifying dimensions and anchor points for proper layout.
Instructions
Attach a cc.UITransform to a node. Required for any UI rendering.
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": {
"scene_path": "<scene_path>",
"node_id": "<node_id>",
"width": "<width>",
"height": "<height>"
},
"name": "cocos_add_uitransform"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| width | Yes | ||
| height | Yes | ||
| anchor_x | No | ||
| anchor_y | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |