cocos_link_property
Link properties between components in Cocos Creator to establish references between nodes or components, or clear existing references when needed.
Instructions
Set a @property on a component to reference another node/component.
Pass target_id=None to clear the reference.
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>",
"component_id": "<component_id>",
"prop_name": "<prop_name>",
"target_id": "<target_id>"
},
"name": "cocos_link_property"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| component_id | Yes | ||
| prop_name | Yes | ||
| target_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |