Set Component Property
unity_set_component_propertySet a serialized property or field on a Unity component by specifying GameObject path, component type, property name, and JSON value. Retry with the allowed-type hint if the property is not settable.
Instructions
Set one serialized property/field on a component. Value is parsed as JSON.
Examples:
{"path":"Player","component_type":"Rigidbody","property":"mass","value_json":"5.0"}
{"path":"Sun","component_type":"Light","property":"intensity","value_json":"2.5"} Fails with allowed-type hint if the property is not settable — read the error and retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Hierarchy path of the GameObject, e.g. 'Player' or 'Level/Enemies/Orc' | |
| property | Yes | Property/field name, e.g. 'mass', 'isKinematic', 'intensity' | |
| value_json | Yes | New value as JSON, e.g. '5.0', 'true', '"hello"', '[0,1,0]' | |
| component_type | Yes | Component type name, e.g. 'Transform' or 'Rigidbody' |