gameobject-component-destroy
Destroy specified components from a Unity GameObject by providing the target object and component references to remove them.
Instructions
Destroy one or many components from target GameObject. Can't destroy missed components. Use 'gameobject-find' tool to find the target GameObject and 'gameobject-component-get' to get component details first.
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>",
"destroyComponentRefs": "<destroyComponentRefs>"
},
"name": "gameobject-component-destroy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameObjectRef | Yes | Target GameObject. SCHEMA: {"name":"ObjectName"} or {"instanceID":12345} | |
| destroyComponentRefs | Yes | Array of component references to destroy. SCHEMA: [{"typeName":"BoxCollider"}] or [{"typeName":"BoxCollider","index":0}] |