gameobject-set-parent

Sets a parent GameObject for a list of GameObjects in a Unity scene or prefab.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill gameobject-set-parent-ishaansingh-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gameobject-set-parent
Source: https://github.com/ishaansingh-ai/Mechanical-2D/tree/main/.claude/skills/gameobject-set-parent
Command: npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill gameobject-set-parent-ishaansingh-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Reorganizing GameObject hierarchies in Unity scenes or prefabs manually is repetitive, especially when many objects need to be moved under a common parent. This Skill performs the reparenting operation programmatically through the unity-mcp-cli tool. ## Core Features & Use Cases - Batch Reparenting: Assign a single parent GameObject to a list of GameObjects in one call. - Flexible Object References: Locate GameObjects by instanceID, hierarchy path, name, or asset identifiers. - Position Control: Choose whether child GameObjects keep their world position via the worldPositionStays flag. - Use Case: After importing environment props into a scene, group all of them under an 'Environment' root GameObject in one command instead of dragging each object in the Unity Editor. ## Quick Start Ask the AI to set the GameObject named 'Environment' as the parent of the GameObjects 'Tree', 'Rock', and 'Bush' in the active scene while keeping their world positions unchanged.

Frequently Asked Questions about gameobject-set-parent

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

FAQPage Schema
How do I set a parent GameObject for multiple objects in Unity?▼

Use the gameobject-set-parent tool through unity-mcp-cli with a list of GameObject references and one parent GameObject reference. All listed GameObjects are reparented under the target parent in a single call.

How do I find GameObjects before reparenting them in Unity?▼

Use the gameobject-find tool first to locate target GameObjects and obtain their references. You can then pass those references, or use instanceID, hierarchy path, or name directly, to gameobject-set-parent.

Does reparenting a GameObject change its world position in Unity?▼

It depends on the worldPositionStays flag. When set to true, the GameObject keeps its world position after reparenting; when false or omitted, its local transform relative to the new parent is preserved instead.

Can I reparent GameObjects inside a prefab with this tool?▼

Yes, the tool works on GameObjects in an opened prefab as well as in the active scene. References can target prefab contents using instanceID, path, name, or asset identifiers.

Why is unity-mcp-cli not found when running the command?▼

The CLI is not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli, or invoke it via npx unity-mcp-cli, and check the unity-initial-setup skill for full installation steps.