gameobject-component-destroy

Destroy specified components from a Unity GameObject after validating their existence.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Silac1995/My-World-Isekai-Unity --skill gameobject-component-destroy-silac1995
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/Silac1995/My-World-Isekai-Unity/tree/main/.claude/skills/gameobject-component-destroy
Command: npx skills add https://github.com/Silac1995/My-World-Isekai-Unity --skill gameobject-component-destroy-silac1995

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destroy one or many components from target GameObject in Unity, ensuring non-existent components are not destroyed and providing safe, deterministic behavior.

Core Features & Use Cases

  • Targeted removal: Remove specified components from a GameObject while leaving others intact.
  • Safety checks: Validates component presence before removal and reports failed hits.
  • Use Case: Clean up a prefab or scene object by removing temporary components before final build.

Quick Start

Destroy components on the target GameObject by passing the GameObject reference and component references to the tool.

Frequently Asked Questions about gameobject-component-destroy

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

FAQPage Schema
How do I destroy specific components on a GameObject in Unity without affecting others?

To destroy components on a GameObject in Unity safely, you pass the target GameObject reference and the specific component references to the tool. This allows targeted removal of specified components while ensuring all other components remain intact.

What happens if I try to destroy a component that does not exist on the GameObject?

When destroying a non-existent component, the tool performs safety checks by validating component presence before removal. It ensures non-existent components are not destroyed and returns a structured result reporting any failed hits.

Can I use this to remove components from Unity prefabs at edit-time?

Yes, you can remove components from Unity prefabs at edit-time. The tool is applicable to both edit-time prefabs and runtime scenes, allowing you to clean up temporary components from a prefab before your final build.

Is it possible to destroy multiple components on a single GameObject at once?

Yes, it is possible to destroy multiple components on a single GameObject at once. You provide the gameObjectRef along with multiple destroyComponentRefs, and the tool will process the batch removal and return a structured result indicating the destroyed components.

What is the safest way to clean up temporary components before a Unity build?

The safest way to clean up temporary components before a Unity build is to use a deterministic removal tool that validates component existence before deletion. This prevents errors by ensuring only existing components are destroyed and reporting any missed targets.