gameobject-component-destroy

Destroys one or more components from a target Unity GameObject via unity-mcp-cli.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill gameobject-component-destroy-fermisloth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment/tree/main/.agent/skills/gameobject-component-destroy
Command: npx skills add https://github.com/Fermisloth/Project-Aegis-Adaptive-Outbreak-Containment --skill gameobject-component-destroy-fermisloth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Removing unwanted or obsolete components from Unity GameObjects manually through the Editor is slow and error-prone, especially when automating scene or prefab modifications through an AI-driven workflow. ## Core Features & Use Cases - Component Removal: Destroys one or many components from a target GameObject in the active Scene or an opened Prefab. - Flexible Targeting: Locates GameObjects by instanceID, hierarchy path, name, or asset reference, and components by index, type name, or instanceID. - Structured Results: Returns a list of the destroyed component references for verification. - Use Case: While refactoring a Unity scene, remove duplicate Rigidbody and legacy script components from a character prefab in a single automated call. ## Quick Start Ask the AI to destroy the specified components on a target GameObject, first using gameobject-find and gameobject-component-get to identify the correct references.

Frequently Asked Questions about gameobject-component-destroy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove a component from a Unity GameObject programmatically?

Use the gameobject-component-destroy tool via unity-mcp-cli with a gameObjectRef and a destroyComponentRefs array. First locate the GameObject with gameobject-find and inspect its components with gameobject-component-get to obtain accurate references.

How do I reference a GameObject for component destruction in Unity MCP?

Provide a GameObjectRef using instanceID (highest priority), hierarchy path, name, or asset path/GUID. Components can be referenced by index, full type name such as UnityEngine.Transform, or instanceID.

Can I destroy multiple components at once on a Unity GameObject?

Yes, the destroyComponentRefs parameter accepts an array of component references, so multiple components can be destroyed in a single call. The response returns the list of successfully destroyed components.

Why does unity-mcp-cli fail with command not found?

The CLI is not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli or invoke it through npx unity-mcp-cli, and consult the unity-initial-setup skill for full installation steps.

What are the limitations of destroying components by type name?

When a GameObject has multiple components of the same type, referencing by typeName produces unpredictable results. Use the component index or instanceID instead for deterministic targeting.