update_component
Update or add a component on a GameObject by specifying the component name and optional field data.
Instructions
Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component
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": {
"componentName": "<componentName>"
},
"name": "update_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | No | The instance ID of the GameObject to update | |
| objectPath | No | The path of the GameObject in the hierarchy to update (alternative to instanceId) | |
| componentData | No | An object containing the fields to update on the component (optional) | |
| componentName | Yes | The name of the component to update or add |