gameobject-component-destroy

Destroy specified components from a Unity GameObject via HTTP API.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/igot-ai/os-twin --skill gameobject-component-destroy-igot-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/igot-ai/os-twin/tree/main/.agents/skills/roles/game-engineer/develop-unity-ui/references/gameobject-component-destroy
Command: npx skills add https://github.com/igot-ai/os-twin --skill gameobject-component-destroy-igot-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destroy one or many components on a target Unity GameObject, preventing accidental destruction of non-existent components by leveraging a prior lookup.

Core Features & Use Cases

  • Destroy specified components on a Unity GameObject.
  • Validate target components exist before removal using a prior fetch (gameobject-get).
  • Use cases include cleaning up legacy components or streamlining objects in modular scenes.

Quick Start

Locate the target GameObject with gameobject-find, verify components with gameobject-component-get, and destroy the chosen components with gameobject-component-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 destroy components on a Unity GameObject safely?▼

To destroy components safely, locate the target GameObject, verify the components exist using a get request, and invoke the destroy API with gameObjectRef and destroyComponentRefs to prevent accidental removal of non-existent components.

How does component validation work before removing components from a Unity GameObject?▼

Component validation works by requiring a prior fetch to confirm the target components exist before removal. This prevents accidental destruction of non-existent components by ensuring you only destroy verified components.

What's the best way to clean up legacy components from Unity scenes or prefabs?▼

The best way to clean up legacy components is to locate the target GameObject, verify the components with a get request, and destroy the specified components using the destroy API with gameObjectRef and destroyComponentRefs.

Can I destroy multiple components on a GameObject in one API call?▼

Yes, you can destroy one or many components on a target GameObject in a single API call by passing the gameObjectRef and an array of destroyComponentRefs to the destroy endpoint.

Do I need to find a GameObject before destroying its components?▼

Yes, you need to locate the target GameObject first using gameobject-find and confirm component details with gameobject-component-get before invoking the destroy API to ensure safe removal.

Why should I verify components exist before destroying them on a Unity GameObject?▼

Verifying components exist before destroying them prevents errors from attempting to remove non-existent components, ensuring safe cleanup of Unity objects in scenes or prefabs.