ui_snapshot
Get a snapshot of the running Godot UI: every control's path, class, text, rect, and state (disabled, focused, checked, value). Flags clipped/occluded controls and uses a hash to skip unchanged UI.
Instructions
One-call UI snapshot of the RUNNING game: every visible Control as structured data â path, class (+custom class_name), text, rect [x,y,w,h] (gui space, ints), and the semantic state pixels can't tell you: disabled, focused, checked (toggles), value + range (sliders/spin/progress), selected (+selected_text / tabs / item_count), editable / placeholder / secret (text fields), tooltip, mouse_ignore. Interactive controls also get honesty flags: clipped (scrolled out of view) and occluded_by (another control would swallow the click â popup/modal/overlay). Top level: focus owner, open popup/dialog windows (exclusive = modal), viewport size, and a stable content 'hash' â pass it back as since_hash and an unchanged UI returns {unchanged:true} for ~free. For functional UI checks this replaces the screenshot + find_ui_elements + get_control_rect + runtime_get_property round-trips (keep screenshot for VISUAL/render bugs). Walks the whole SceneTree root (autoload HUD layers and popups included); scope with path=, slim with interactive_only=true, cap with max_nodes (default 400).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | subtree root to scope the walk (name, relative, or /root/...) | |
| max_nodes | No | cap on emitted controls (default 150) | |
| occlusion | No | compute occluded_by for interactive controls (default true; one hit-test walk per interactive control) | |
| since_hash | No | hash from a previous call â unchanged UI returns {unchanged:true} instead of the payload | |
| interactive_only | No | only buttons/sliders/text fields/lists/tabs + focusables (default false: all visible controls, labels included) |