gameobject-set-parent

Featured

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 3,680 stars 331 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