gameobject-set-parent

Solid

Reparent a batch of GameObjects under a new parent in the currently opened Prefab or active Scene. Per-item failures are reported in the returned status string instead of aborting the batch. Use 'gameobject-find' to locate the GameObjects first.

AI & Automation 2,976 stars 277 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# GameObject / Set Parent Set parent GameObject to list of GameObjects in opened Prefab or in a Scene. Use 'gameobject-find' tool to find the target GameObjects first. ## Inputs - `gameObjectRefs` — list of children to reparent. - `parentGameObjectRef` — new parent. Must resolve, otherwise the call returns early with an error string. - `worldPositionStays` (default `true`) — preserve world-space transform when reparenting (passed to `Transform.SetParent`). ## Behavior Iterates `gameObjectRefs` and reparents each one independently; per-item resolve errors are appended to the returned status string instead of throwing. After the loop, if at least one reparent succeeded, marks the active scene dirty and repaints editor windows. ## How to Call ```bash unity-mcp-cli run-tool gameobject-set-parent --input '{ "gameObjectRefs": "string_value", "parentGameObjectRef": "string_value", "worldPositionStays": false }' ``` > For complex input (multi-line strings, code), save the JSON to a file and use: > ```bash > unity-mcp-cli run-tool gameobject-set-parent --input-file args.json > ``` > > Or pipe via stdin (recommended): > ```bash > unity-mcp-cli run-tool gameobject-set-parent --input-file - <<'EOF' > {"param": "value"} > EOF > ``` ### Troubleshooting If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead. Read the /unity-initial-setup skill for detailed installation instructions. ## Input | Name |...

Details

Author
IvanMurzak
Repository
IvanMurzak/Unity-MCP
Created
1 years ago
Last Updated
today
Language
C#
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

gameobject-duplicate

Duplicate a batch of GameObjects in the currently opened Prefab or active Scene. Marks each affected scene as dirty after duplication. Use 'gameobject-find' to locate the source GameObjects first.

2,976 Updated today
IvanMurzak
AI & Automation Solid

gameobject-create

Create a new GameObject in the currently opened Prefab or active Scene, optionally parented under another GameObject and pre-positioned. Pass `primitiveType` to spawn a Unity primitive (Cube, Sphere, etc.) instead of an empty GameObject.

2,976 Updated today
IvanMurzak
AI & Automation Solid

gameobject-modify

Modify GameObject fields and properties in opened Prefab or in a Scene. You can modify multiple GameObjects at once. Just provide the same number of GameObject references and SerializedMember objects. Three modification surfaces are available per GameObject (gameObjectDiffs, pathPatchesPerGameObject, jsonPatchesPerGameObject) — see the skill body for details.

2,976 Updated today
IvanMurzak
AI & Automation Solid

gameobject-destroy

Destroy a GameObject (and all nested children) in the currently opened Prefab or active Scene. Returns the destroyed GameObject's name, path, and instance ID for confirmation. Use 'gameobject-find' to locate the target first.

2,976 Updated today
IvanMurzak
AI & Automation Listed

set-parent

Set or remove a GitHub sub-issue (parent/child) relationship. Run with /set-parent <child#> <parent#> or /set-parent remove <child#> <parent#>.

17 Updated today
nick-pape