ui.find
Overview
- Searches the visible UMG tree and returns matching widgets with their refs, so you can act on something without pulling down a whole tree first. text matches the displayed (localized) label as a case-insensitive substring; name matches the widget's FName the same way; role must match exactly. Filters combine with AND, and results are limited to interactive widgets and text so an unfiltered search does not dump the tree. Only interactive results carry a ref and a rect. Returns an empty array when there is no world.
Metadata
| Field | Value |
|---|---|
| Display | Find UI Widget |
| Category | ui |
| Access | Public |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | no | — | Substring of the displayed label (case-insensitive). |
| role | string | no | — | Exact role to match. |
| name | string | no | — | Substring of the widget FName (case-insensitive). |
| window | string | no | — | Restrict the search to one window (UIType name or window instance name). |
| limit | int | no | 20 | Maximum number of matches [1-200]. |
Returns
Returns a JSON array; each element is an object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
role | string | yes | Node role |
ref | string | no | Ref usable with ui.click / ui.scroll / ui.get_node. Absent for text-only matches |
text | string | no | Displayed label |
ui_type | string | no | EB1UIType name of the owning window |
rect | array<int> | no | Viewport pixel rect [x, y, width, height]. Present only for interactive matches |
Usage
await inzoi.cli.execute('ui.find', {
text: '', // optional
role: '', // optional
name: '', // optional
window: '', // optional
limit: 20, // optional
});