gameobject-component-destroy

Destroys specified components on a Unity GameObject while validating their existence.

Updated Feb 4, 2024
One-click install
npx skills add https://github.com/sprillion/gem_td --skill gameobject-component-destroy-sprillion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-component-destroy
Source: https://github.com/sprillion/gem_td/tree/main/SKILLS/gameobject-component-destroy
Command: npx skills add https://github.com/sprillion/gem_td --skill gameobject-component-destroy-sprillion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destroy one or many components from a target GameObject. It prevents attempting to destroy components that are not present.

Core Features & Use Cases

  • Destroy specified components on a target GameObject.
  • Guard against missing components to avoid errors.
  • Use gameobject-find to locate the target and gameobject-component-get to verify components before destruction.

Quick Start

Locate the target GameObject with gameobject-find, verify components with gameobject-component-get, then destroy the specified components.

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

Yes, you can destroy multiple components from a single GameObject in one operation. The tool validates inputs and guards against missing components to avoid errors, returning details of all successfully destroyed components.

How do I prevent errors when destroying missing components on a Unity prefab?

Before destroying components on a GameObject, use gameobject-find to locate the target and gameobject-component-get to verify the components exist. This workflow prevents attempting to destroy components that are not present.

What is the best way to automate component removal for Unity prefabs?

The best way to automate component removal for Unity prefabs is to use a tooling Skill that validates inputs and prevents destroying non-existent components. This ensures safe, automated destruction across target GameObjects.

Does component destruction work on both Unity GameObjects and prefabs?

Yes, component destruction works on both Unity GameObjects and prefabs. The Skill applies to Unity projects where components need to be removed from specific GameObjects or prefabs, validating inputs to prevent destroying non-existent components.