gameobject-set-parent

Reparent multiple GameObjects to a specified parent in Unity prefabs or scenes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reparents a list of GameObjects to a specified parent within the currently opened Prefab or active Scene, streamlining hierarchy organization.

Core Features & Use Cases

  • Batch re-parenting of multiple GameObjects under a single parent within prefabs or scenes.
  • Works in both opened Prefabs and active Scenes, preserving or adjusting world position as needed.
  • Suitable for organizing complex hierarchies in Unity projects.

Quick Start

Select the target GameObjects with gameobject-find and execute gameobject-set-parent to attach them under the desired parent.

Frequently Asked Questions about gameobject-set-parent

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

FAQPage Schema
How do I reparent multiple GameObjects in a Unity scene at once?

You can batch reparent multiple GameObjects in a Unity scene by passing a list of gameObjectRefs and a parentGameObjectRef to the tool, attaching them all under a single parent in one operation.

Can I reorganize hierarchy inside an opened Unity Prefab?

Yes, reparenting works within both the currently active Unity Scene and opened Prefabs, allowing you to organize complex prefab hierarchies and attach multiple child objects under a specified parent.

Does reparenting GameObjects keep their world position in Unity?

Reparenting GameObjects supports an optional worldPositionStays flag, letting you preserve or adjust the world position of the objects as they are moved under the new parent in the hierarchy.

What is the best way to automate scene hierarchy organization in Unity?

Automating scene hierarchy organization is handled by a deterministic tool exposed via the MCP HTTP API, which accepts gameObject references and reparents them to streamline complex Unity project structures.

Do I need to find GameObjects before setting their parent in Unity?

Yes, you need to select the target GameObjects first, typically using a gameobject-find tool, and then execute the reparenting operation to attach them under the desired parent in your scene or prefab.