About uloop-find-game-objects
uloop find-game-objects is a Unity Editor command for searching GameObjects or inspecting the current Hierarchy selection. It offers several name and path matching modes, with filters for components, tags, and layers.
Key features
- 01Search by name, path, or regex
- 02Inspect currently selected objects
- 03Filter by components, tags, and layers
- 04View active state and component properties
- 05Include inactive objects
Use cases
- 01Locate a particular GameObject in a scene
- 02Inspect components and properties of selected objects
- 03Narrow searches by tag or layer
- 04Find inactive scene objects
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ hatayama/ unity-cli-loop --skill uloop-find-game-objectsAfter installing, type/uloop-find-game-objectsin Claude Code to confirm it loaded.
Details
From the project READMEuloop find-game-objects
Find GameObjects with search criteria or get details for currently selected Hierarchy objects.
Use this before execute-dynamic-code when identifying or inspecting selected GameObjects. Use get-hierarchy instead when you need the child tree, parent-child structure, or descendants under the selection.
Usage
uloop find-game-objects [options]
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--name-pattern | string | - | Name pattern to search |
--search-mode | string | exact | Search mode: exact, path, regex, contains, selected |
--required-components | array | - | Required components |
--tag | string | - | Tag filter |
--layer | integer | - | Layer filter (layer number) |
--max-count | integer | 20 | Maximum number of results |
--include-inactive | flag | - | Include inactive GameObjects |
--include-inherited-properties | flag | - | Include inherited properties in results |
Search Modes
| Mode | Description |
|---|---|
exact | Exact name match (default). Trap: --name-pattern "Camera" will not match a GameObject named "Main Camera" — use contains or regex for partial matching. A zero-hit exact search returns a Message hint pointing this out. |
path | Hierarchy path search (e.g., Canvas/Button) |
regex | Regular expression pattern |
contains | Partial name match |
selected | Get currently selected GameObjects in Unity Editor |
Output
Returns JSON with:
Results(array): Matching GameObjects, each containing:Name(string): GameObject namePath(string): Hierarchy path (e.g.,Canvas/Panel/Button)IsActive(boolean): Active state in hierarchyTag(string): GameObject tagLayer(number): Layer indexComponents(array): Each entry hasType(short name, e.g.,Rigidbody),FullTypeName(e.g.,UnityEngine.Rigidbody), andProperties(array of Inspector-visible{Name, Type, Value}pairs)
TotalFound(number): Results returned (after--max-countclipping). For multi-selection file export, this is the number exported.ErrorMessage(string): Top-level failure summary (empty on success)ProcessingErrors(array): Selected-mode per-GameObject serialization failures, each{GameObjectName, GameObjectPath, Error}. Omitted/null or empty on clean runs.
Multi-selection file export
For selected mode with multiple successfully serialized GameObjects, inline Results is not populated and the data is written to a file instead. Two extra fields appear:
ResultsFilePath(string): Relative path under.uloop/outputs/FindGameObjectsResults/Message(string): Human-readable summary (e.g., "5 GameObjects exported")
Single-selection and search-mode calls (exact, path, regex, contains) always return inline. No selection (selected mode with empty selection) returns empty Results plus a Message.