query_objects
Query GameObjects using U-Selector syntax (similar to CSS selectors). Supports: #Name (exact name), .Component (has component), /Path (hierarchy path), [prop=value] (attribute), ui:#name or ui:.class (UI Toolkit elements)
Category: Query
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector |
string | yes | U-Selector query string. Examples: ‘#Player’, ‘.Camera’, ‘/Canvas/Menu’, ‘.Enemy[Health>50]’ | |
include_inactive |
boolean | false |
Include inactive GameObjects in search | |
max_results |
integer | 100 |
Maximum number of results to return (0 = unlimited) | |
include_details |
boolean | false |
Include component and transform details in results |
Example call
Section titled “Example call”The arguments below are the required ones; add the optional ones you need.
{ "name": "query_objects", "arguments": { "selector": "…" }}In SuperSave mode
Section titled “In SuperSave mode”When Unity runs with NANORA_MCP_SUPERSAVE=1, call it through the execute meta tool: {"tool": "query_objects", "args": { … }}. See SuperSave mode.
Source
Section titled “Source”Generated from Assets/NanoraUnityMCP/Editor/Tools/QueryObjectsTool.cs (version 1.2.1). The client receives the same schema from tools/list.