uloop-find-game-objects
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseuloop find-game-objects
uloop find-game-objects
Find GameObjects with search criteria or get currently selected objects.
根据搜索条件查找GameObject,或获取当前选中的对象。
Usage
使用方法
bash
uloop find-game-objects [options]bash
uloop find-game-objects [options]Parameters
参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | - | Name pattern to search |
| string | | Search mode: |
| array | - | Required components |
| string | - | Tag filter |
| string | - | Layer filter |
| integer | | Maximum number of results |
| boolean | | Include inactive GameObjects |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| string | - | 要搜索的名称模式 |
| string | | 搜索模式: |
| array | - | 必需的组件 |
| string | - | 标签筛选器 |
| string | - | 层筛选器 |
| integer | | 最大结果数量 |
| boolean | | 包含非激活状态的GameObject |
Search Modes
搜索模式
| Mode | Description |
|---|---|
| Exact name match |
| Hierarchy path search (e.g., |
| Regular expression pattern |
| Partial name match (default) |
| Get currently selected GameObjects in Unity Editor |
| 模式 | 描述 |
|---|---|
| 精确名称匹配 |
| 层级路径搜索(例如: |
| 正则表达式模式 |
| 部分名称匹配(默认) |
| 获取Unity编辑器中当前选中的GameObject |
Global Options
全局选项
| Option | Description |
|---|---|
| Target a specific Unity project (mutually exclusive with |
| Specify Unity TCP port directly (mutually exclusive with |
| 选项 | 描述 |
|---|---|
| 指定目标Unity项目(与 |
| 直接指定Unity的TCP端口(与 |
Examples
示例
bash
undefinedbash
undefinedFind by name
按名称查找
uloop find-game-objects --name-pattern "Player"
uloop find-game-objects --name-pattern "Player"
Find with component
按组件查找
uloop find-game-objects --required-components Rigidbody
uloop find-game-objects --required-components Rigidbody
Find by tag
按标签查找
uloop find-game-objects --tag "Enemy"
uloop find-game-objects --tag "Enemy"
Regex search
正则表达式搜索
uloop find-game-objects --name-pattern "UI_.*" --search-mode Regex
uloop find-game-objects --name-pattern "UI_.*" --search-mode Regex
Get selected GameObjects
获取选中的GameObject
uloop find-game-objects --search-mode Selected
uloop find-game-objects --search-mode Selected
Get selected including inactive
获取选中对象,包含非激活状态
uloop find-game-objects --search-mode Selected --include-inactive
undefineduloop find-game-objects --search-mode Selected --include-inactive
undefinedOutput
输出
Returns JSON with matching GameObjects.
For mode with multiple objects, results are exported to file:
Selected- Single selection: JSON response directly
- Multiple selection: File at
.uloop/outputs/FindGameObjectsResults/ - No selection: Empty results with message
返回包含匹配GameObject的JSON数据。
对于模式下的多个对象,结果将导出到文件:
Selected- 单个选中对象:直接返回JSON响应
- 多个选中对象:文件位于
.uloop/outputs/FindGameObjectsResults/ - 无选中对象:返回空结果及提示信息