gameobject-set-parent
Set parent for multiple GameObjects in a Unity scene or prefab while optionally preserving world positions. Specify child objects and new parent; use null to unparent. Ideal for organizing hierarchies.
Instructions
Set parent GameObject to list of GameObjects in opened Prefab or in a Scene. Use 'gameobject-find' tool to find the target GameObjects first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameObjectRefs | Yes | Array of GameObjectRef to reparent. SCHEMA: [{"name":"ChildObject"}] | |
| parentGameObjectRef | Yes | New parent. SCHEMA: {"name":"ParentObject"} or {"instanceID":12345}. Use null to unparent. | |
| worldPositionStays | No | A boolean flag indicating whether the GameObject's world position should remain unchanged when setting its parent. | true |