unity_component_set_property
Set serialized component property values in Unity: numbers, strings, bools, vectors, colors, enums, or object references via GameObject path and property name.
Instructions
Set a serialized component property: numbers, strings, bools, vectors, colors, enums or object references.
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": {
"gameObjectPath": "<gameObjectPath>",
"componentType": "<componentType>",
"propertyName": "<propertyName>",
"value": "<value>"
},
"name": "unity_component_set_property"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| value | Yes | ObjectReference: asset path, scene name, null, or {assetPath?,instanceId?,gameObject?,componentType?}. Enum: name, index (0-based), or {enumValue:int} for flags/raw values. | |
| propertyName | Yes | Name of the property to set | |
| componentType | Yes | Component type name | |
| gameObjectPath | Yes | Path or name of target GameObject |