uloop-get-hierarchy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

uloop get-hierarchy

uloop get-hierarchy

Get Unity Hierarchy structure.
获取Unity Hierarchy结构。

Usage

Usage

bash
uloop get-hierarchy [options]
bash
uloop get-hierarchy [options]

Parameters

Parameters

ParameterTypeDefaultDescription
--root-path
string-Root GameObject path to start from
--max-depth
integer
-1
Maximum depth (-1 for unlimited)
--include-components
boolean
true
Include component information
--include-inactive
boolean
true
Include inactive GameObjects
--include-paths
boolean
false
Include full path information
--use-selection
boolean
false
Use selected GameObject(s) as root(s). When true,
--root-path
is ignored.
参数类型默认值描述
--root-path
string-起始的根GameObject路径
--max-depth
integer
-1
最大深度(-1表示无限制)
--include-components
boolean
true
包含组件信息
--include-inactive
boolean
true
包含非激活状态的GameObject
--include-paths
boolean
false
包含完整路径信息
--use-selection
boolean
false
使用选中的GameObject作为根节点。启用此选项时,
--root-path
将被忽略。

Global Options

Global Options

OptionDescription
--project-path <path>
Target a specific Unity project (mutually exclusive with
--port
). Path resolution follows the same rules as
cd
— absolute paths are used as-is, relative paths are resolved from cwd.
-p, --port <port>
Specify Unity TCP port directly (mutually exclusive with
--project-path
).
选项描述
--project-path <path>
指定目标Unity项目(与
--port
互斥)。路径解析遵循与
cd
相同的规则——绝对路径直接使用,相对路径从当前工作目录解析。
-p, --port <port>
直接指定Unity TCP端口(与
--project-path
互斥)。

Examples

Examples

bash
undefined
bash
undefined

Get entire hierarchy

获取完整层级结构

uloop get-hierarchy
uloop get-hierarchy

Get hierarchy from specific root

获取指定根节点下的层级结构

uloop get-hierarchy --root-path "Canvas/UI"
uloop get-hierarchy --root-path "Canvas/UI"

Limit depth

限制层级深度

uloop get-hierarchy --max-depth 2
uloop get-hierarchy --max-depth 2

Without components

不包含组件信息

uloop get-hierarchy --include-components false
uloop get-hierarchy --include-components false

Get hierarchy from currently selected GameObjects

获取当前选中GameObject的层级结构

uloop get-hierarchy --use-selection
undefined
uloop get-hierarchy --use-selection
undefined

Output

Output

Returns JSON with hierarchical structure of GameObjects and their components.
返回包含GameObject及其组件层级结构的JSON数据。