assert_ui_state
Assert UI state matches expected value. Playwright-style expect/assertion that waits until condition is met or times out.
Category: Test
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selector |
string | yes | U-Selector to find the target object (e.g., ‘#ScoreText’, ‘.Button’) | |
property |
string | yes | Property to check: text, active, enabled, visible, color, alpha, value, interactable. One of: text, active, enabled, visible, color, alpha, value, interactable |
|
expected |
yes | Expected value (string, boolean, number depending on property) | ||
comparison |
string | "equals" |
Comparison operator. One of: equals, contains, starts_with, ends_with, greater_than, less_than, not_equals |
|
timeout |
number | 5 |
Timeout in seconds | |
poll_interval |
number | 0.1 |
Poll interval in seconds |
Example call
Section titled “Example call”The arguments below are the required ones; add the optional ones you need.
{ "name": "assert_ui_state", "arguments": { "selector": "…", "property": "text", "expected": "…" }}In SuperSave mode
Section titled “In SuperSave mode”When Unity runs with NANORA_MCP_SUPERSAVE=1, call it through the execute meta tool: {"tool": "assert_ui_state", "args": { … }}. See SuperSave mode.
Source
Section titled “Source”Generated from Assets/NanoraUnityMCP/Editor/Tools/AssertUiStateTool.cs (version 1.2.1). The client receives the same schema from tools/list.