unity_scene_hierarchy
Retrieve the hierarchy tree of all GameObjects in the active Unity scene, including components and children. Dense output omits default values to reduce noise.
Instructions
Get the hierarchy tree of all GameObjects in the active scene, including their components and children. Dense by default: per-node fields at their default value (active=true, tag=Untagged, layer=Default, origin position, Transform) are omitted — an absent field means the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| verbose | No | Emit every per-node field even at default values (the pre-2.37 shape). | |
| maxDepth | No | Maximum depth to traverse (default: 10) | |
| maxNodes | No | Maximum total nodes to return (default: 5000). Use lower values for very large scenes to avoid timeouts. | |
| parentPath | No | Only return hierarchy under this GameObject path (e.g. 'Canvas/Panel'). Useful for exploring specific subtrees in large scenes. |