cocos_set_node_layer
Set a node's layer bitmask in Cocos Creator scenes to control rendering and interaction groups, using predefined values like UI_2D or DEFAULT.
Instructions
Set a node's layer bitmask. Common: UI_2D=33554432, DEFAULT=1073741824.
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>",
"layer": "<layer>"
},
"name": "cocos_set_node_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| layer | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |