Query Selector
Finds GameObjects in open scenes (and optionally every scene under Assets/) by tag, layer name, component type name, and/or name regex. Filters are AND.
Editor-only. Unity 2021.3+. Lives in Rivet.Editor (includePlatforms: Editor). No extra packages.
Editor window
ArTchie / Rivet / Query Selector
| Control | What it does |
|---|---|
| Tag / Layer / Component type / Name regex | Leave a field empty to ignore it. Layer is a popup of named layers. |
| Search all project scenes | Walks Assets/**/*.unity (skips Packages/ and Library/). Restores your previous scene setup afterwards. |
| Find | Runs the query (includes inactive objects). Also scans an open Prefab Stage. |
| Select in Hierarchy | Selects hits that are in a currently loaded scene and pings the first. |
| Ping first / Ping | Pings one hit. If its scene is closed, opens it additive (after a save prompt) and pings. |
| Copy JSON / Write report | Writes <project>/RivetReports/query-selector.json. |
Batchmode (CI)
Unity -batchmode -nographics -quit -projectPath <proj> -executeMethod Rivet.QuerySelector.RunBatch -rivet-tag Player -rivet-out <file.json> -rivet-fail
Unity -batchmode -nographics -quit -projectPath <proj> -executeMethod Rivet.QuerySelector.RunBatch -rivet-component Camera -rivet-all-scenes
Batch requires at least one of the filter args.
| Arg | Meaning |
|---|---|
-rivet-tag <tag> |
Exact tag (Untagged is valid). |
-rivet-layer <name> |
Layer name (LayerMask.NameToLayer). |
-rivet-component <type> |
Short or full type name (must be a Component). Prefers UnityEngine on short-name clashes. |
-rivet-name <regex> |
Case-sensitive name regex (CultureInvariant, 1s timeout). |
-rivet-all-scenes |
Search every scene under Assets/ (OpenSceneMode.Single in batch). |
-rivet-out <file.json> |
Output path. Default: <project>/RivetReports/query-selector.json |
-rivet-fail |
Exit code 1 if count is 0. |
Missing filters, an unknown layer, an unknown component type, or an invalid regex exits 1 in batch.
RunBatch only calls EditorApplication.Exit when Application.isBatchMode is true. It logs count= and the output path.
Also accepts -rivet-tag=Player / -rivet-out=file.json.
JSON
{
"tool": "QuerySelector",
"generatedUtc": "2026-08-18T02:00:00Z",
"count": 1,
"items": [
{
"scene": "Assets/Scenes/Main.unity",
"objectPath": "Player/Weapon",
"tag": "Player",
"layer": "Default"
}
]
}
objectPath is the hierarchy path (/-joined names). Untitled / Prefab Stage rows use the scene name or prefab asset path.
Notes
- Hierarchy select / ping only works for objects that are loaded (or whose scene the Ping button just opened).
-rivet-all-scenesin the window is additive open+close and then restores the previous setup. Batch opens Single and does not restore.- Empty projects, no open scenes, and a missing
RivetReportsfolder are fine (count0). - Does not modify scenes. Does not touch runtime player code.
Source in the box: Assets/ArTchie Studios/ArTchie-Suite/com.artchie.rivet/Documentation/QuerySelector.md