Set Parent
set_parentReparent Unity GameObjects to a new parent or scene root. Control transform preservation with world_position_stays option.
Instructions
Reparent existing GameObject. parent=null → move to scene root. world_position_stays=True (default): preserves world transform. False: stays local to new parent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Scene path of the GameObject to reparent | |
| parent | No | New parent scene path (omit or null = move to scene root) | |
| world_position_stays | No | True (default) = preserve world transform; False = keep local transform relative to new parent |