cocos_add_editbox
Add text input fields to Cocos Creator UI nodes for user interaction, configuring input modes, placeholders, and length limits to create interactive game interfaces.
Instructions
Attach cc.EditBox. input_mode: 0=ANY, 6=SINGLE_LINE. -1=unlimited length.
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>"
},
"name": "cocos_add_editbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| placeholder | No | Enter text... | |
| max_length | No | ||
| input_mode | No | ||
| return_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |