gameobject-component-destroy

Remove specified components from a target Unity GameObject.

Updated May 3, 2026
One-click install
npx skills add https://github.com/RakameNouya/MR-Bab_10_and_Kel_3 --skill gameobject-component-destroy-rakamenouya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/RakameNouya/MR-Bab_10_and_Kel_3/tree/main/.gemini/skills/gameobject-component-destroy
Command: npx skills add https://github.com/RakameNouya/MR-Bab_10_and_Kel_3 --skill gameobject-component-destroy-rakamenouya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill solves the problem of removing specific components from a target GameObject in a Unity environment, ensuring that missing or non-existent components are gracefully skipped.

Core Features & Use Cases

  • Component Destruction: Destroys specified components from a target GameObject.
  • Skips Missing Components: If a component does not exist, it is skipped without error.
  • Component Identification: Requires 'gameobject-find' and 'gameobject-component-get' skills to identify components first.
  • Use Case: A scenario where a developer wants to remove certain components from a GameObject, such as when cleaning up a scene or reverting a GameObject to its default state.

Quick Start

Run the gameobject-component-destroy skill with the required 'gameObjectRef' and 'destroyComponentRefs' to remove the specified components from the target GameObject.

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 specific components from a GameObject in Unity?

To remove specific components from a GameObject in Unity, use this Skill with the required gameObjectRef and destroyComponentRefs to destroy specified components while gracefully skipping missing ones.

What happens if I try to destroy a missing component on a Unity GameObject?

If a component does not exist on the target GameObject, the component destruction process gracefully skips it without throwing an error, ensuring safe cleanup.

How do I identify components before destroying them from a GameObject?

You need to use the gameobject-find and gameobject-component-get skills first to identify the target GameObject and its components before passing the references to the component destruction process.

Can I use this Skill to revert a GameObject to its default state in Unity?

Yes, you can use this component destruction Skill to remove specific components added during runtime, which is useful for cleaning up a scene or reverting a GameObject to its default state.

Does Unity GameObject component destruction validate references before removal?

Yes, the destruction process utilizes Unity's GameObject and Component API to validate component references before removal, ensuring only specified existing components are destroyed.