gameobject-component-modify
Directly modify a component's fields and properties on a GameObject in an open prefab or scene. Inspect the component structure first using the get tool.
Instructions
Modify a specific Component on a GameObject in opened Prefab or in a Scene. Allows direct modification of component fields and properties without wrapping in GameObject structure. Use 'gameobject-component-get' first to inspect the component structure before modifying.
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": {
"gameObjectRef": "<gameObjectRef>",
"componentRef": "<componentRef>",
"componentDiff": "<componentDiff>"
},
"name": "gameobject-component-modify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameObjectRef | Yes | Target GameObject. SCHEMA: {"name":"ObjectName"} or {"instanceID":12345} | |
| componentRef | Yes | Component to modify. SCHEMA: {"typeName":"Transform"} | |
| componentDiff | Yes | SerializedMember diff. SCHEMA: {"props":[{"name":"size","value":{"x":2,"y":2,"z":2}}],"fields":[...]} |