gameobject-set-parent
Reparent GameObjects in Unity scenes or prefabs to organize hierarchies, set new parent-child relationships, or unparent objects while optionally maintaining world positions.
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
TableJSON 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 |