cocos_duplicate_node
Create a shallow copy of a Cocos Creator node without its children or components, returning the new node's index for scene editing.
Instructions
Shallow-copy a node (no children/components). Returns new node index.
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_duplicate_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| new_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |