unity_set_material
Set a shader property on an object's material or a material asset; by default, copy the material so shared objects stay unchanged.
Instructions
Set a shader property (color/float/vector) on the material of an object, or on a material asset. By default the renderer gets its own copy so other objects sharing the material are untouched. (Unity editor offline right now: schemas are cached; calls will fail until it reconnects)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "unity_set_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | instance (default) copies the material for this object only; shared edits the material asset itself and affects every user of it | |
| path | No | GameObject path (material is taken from its Renderer) | |
| type | No | force the value kind | |
| value | No | number, #hex, [r,g,b,a] or [x,y,z] | |
| material | No | optional material asset path or builtin name like Default-Material, overrides path | |
| property | No | shader property, e.g. color or _BaseColor |