gameobject-component-destroy

Remove specified components from Unity GameObjects in scenes or prefabs.

3.8k|349|Updated Apr 2, 2025
One-click install
npx skills add https://github.com/IvanMurzak/Unity-MCP --skill gameobject-component-destroy-ivanmurzak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/IvanMurzak/Unity-MCP/tree/main/Unity-MCP-Plugin/.claude/skills/gameobject-component-destroy
Command: npx skills add https://github.com/IvanMurzak/Unity-MCP --skill gameobject-component-destroy-ivanmurzak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destroy one or many components from a target GameObject. It cannot destroy components that are not present, and you should first use gameobject-find to locate the target and gameobject-component-get to inspect components before destruction.

Core Features & Use Cases

  • Selective destruction by component reference or type, enabling precise cleanup of Unity GameObjects.
  • Pre-destruction validation to avoid removing non-existent components and ensure safe operations.
  • Works across opened Scenes and Prefabs, integrating with gameobject-find and gameobject-component-get to locate and verify targets.

Quick Start

Use the gameobject-component-destroy tool to remove one or more components from a targeted GameObject by providing its reference and the components to destroy.

Frequently Asked Questions about gameobject-component-destroy

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

FAQPage Schema
How do I safely remove components from a Unity GameObject?

To safely remove components from a Unity GameObject, use a destruction tool with pre-destruction validation to ensure you only purge components that actually exist on the target object.

What is the best way to destroy multiple components on a Unity prefab?

Destroying multiple components on a Unity prefab is best handled by selective destruction tools that reference specific types, ensuring precise cleanup without accidentally removing necessary GameObject elements.

How do I check existing components before destroying them in Unity?

To check existing components before destruction in Unity, use a component inspection step to verify available types on the target GameObject, ensuring you only attempt to remove valid components.

Does Unity MCP CLI work with component destruction across multiple scenes?

Yes, Unity MCP CLI supports component destruction across opened scenes and prefabs, allowing you to target and purge specific GameObject components within your active Unity project environment.

Why does GameObject component destruction fail when components are missing?

GameObject component destruction fails when components are missing because the operation attempts to target non-existent items, requiring pre-destruction validation to verify available components before execution.