gameobject-destroy

Remove a target GameObject and all nested children from a Prefab or Scene.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/lightvu25/Echoes --skill gameobject-destroy-lightvu25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gameobject-destroy
Source: https://github.com/lightvu25/Echoes/tree/main/SKILLS/gameobject-destroy
Command: npx skills add https://github.com/lightvu25/Echoes --skill gameobject-destroy-lightvu25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Destroy GameObject and all nested GameObjects recursively in opened Prefab or in a Scene. Use 'gameobject-find' tool to find the target GameObject first.

Core Features & Use Cases

  • Recursive destruction of the target GameObject within an opened Prefab or active Scene.
  • Operates on the full hierarchy to ensure complete cleanup of nested objects.
  • Use Case: remove entire branches from a prefab before exporting or refining a scene.

Quick Start

Find the target GameObject in the opened Prefab or Scene with gameobject-find and run gameobject-destroy to remove it and all descendants.

Frequently Asked Questions about gameobject-destroy

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

FAQPage Schema
How do I destroy a Unity GameObject and all its children recursively?

To destroy a Unity GameObject recursively, you can use a tool that removes the target object and all nested children from an opened Prefab or active Scene, ensuring complete cleanup of the entire hierarchy branch.

What is the best way to remove nested GameObjects from a Prefab before export?

Removing nested GameObjects from a Prefab before export is best handled by recursively destroying the target object and its descendants, which cleans up entire branches from the hierarchy in Prefab mode.

Can I delete a GameObject branch in a Unity Scene using an HTTP API?

Yes, you can delete a GameObject branch in a Unity Scene by invoking the destruction logic via the MCP Plugin HTTP API, passing a gameObjectRef in the payload to target the object.

How do I find a target GameObject in a Scene before destroying it?

To find a target GameObject in a Scene before destroying it, you should use a gameobject-find tool first to locate the object, then pass its reference to the destruction tool to remove it.

Does recursive GameObject destruction work in both Prefab mode and active Scenes?

Yes, recursive GameObject destruction works in both Prefab mode and active Scenes, allowing you to clean up hierarchies and remove entire branches regardless of whether you are editing a Prefab or a Scene.