unity_gameobject_delete
Delete a GameObject by hierarchy path or name. Prevents deletion if the runtime mesh is shared by other objects, unless forced.
Instructions
Delete a GameObject by path or name. Refuses if its runtime mesh is shared by other objects (ProBuilder clones) — reports sharedWith; pass force:true to override.
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_gameobject_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Hierarchy path or name of the GameObject to delete | |
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| force | No | Delete even when the runtime mesh is shared by other objects (ProBuilder clones). Default false. | |
| instanceId | No | Instance ID (alternative to path) |