update_gameobject
Update a GameObject's properties by instance ID or path. Creates the GameObject if it doesn't exist.
Instructions
Updates properties of a GameObject in the Unity scene by its instance ID or path. If the GameObject does not exist at the specified path, it will be created.
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": {
"gameObjectData": "<gameObjectData>"
},
"name": "update_gameobject"
}
}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) | |
| gameObjectData | Yes | An object containing the fields to update on the GameObject (name, tag, layer, activeSelf, isStatic). If the GameObject does not exist at objectPath, it will be created. |