read_pie_widgets
Read live UMG widget trees from a running PIE session: enumerate viewport UserWidgets, descend nested Blueprints, and return visibility, text, values, and geometry.
Instructions
Read LIVE UMG from the running PIE session (game thread): enumerate the active UUserWidgets added to the viewport and walk each widget tree, emitting name/class plus optional visibility/hover/text/value/geometry as a parent/child tree. Reads only game-thread-safe widget-tree state (never the render thread). Errors clearly if no Play-In-Editor session is running. DESCENDS INTO NESTED WIDGET BLUEPRINTS: an AAA screen is a Widget Blueprint composed of Widget Blueprints, so everything interesting sits one level below the first. Cycles are handled with a visited set plus max_depth, and a subtree that IS cut says so in subtree_omitted instead of looking like a leaf. Rich text is read too (URichTextBlock does not derive from UTextBlock). Not implemented: include_bindings, which is accepted and flagged in bindings_note.
Returns: { widgets: [{ widget_name, class, is_any_animation_playing, visibility?, is_hovered?, children: [{ widget_name, class, visibility?, is_hovered?, text?, is_enabled?, value?, percent?, is_checked?, selected_option?, geometry?, children: [...] }] }], widget_count: int, scanned_viewport_widgets: int, include_text: bool, include_visibility: bool, include_bindings: bool, include_values: bool, include_geometry: bool, bindings_note?: string, world: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| world | No | Optional world selector: absent/'pie' (default: PlayWorld, else the first PIE context) | 'server' (the PIE world with authority) | 'client' | 'pie:N' | 'game' (alias of 'pie'). In a 2-player PIE session EVERY client has its OWN widgets, so the default may well read the other player's HUD. | |
| max_depth | No | Optional recursion limit (-1 = unlimited, the default). Counts every level including the descent into a nested Widget Blueprint's own tree. A subtree cut by the limit reports subtree_omitted rather than passing for a leaf. | |
| root_filter | No | Optional case-sensitive substring; only top-level UserWidgets whose object name contains it are returned. | |
| include_text | No | Optional bool (default true): include UTextBlock text. | |
| include_values | No | Optional bool (default false): include is_enabled + widget-type-specific value (Slider.value / ProgressBar.percent / CheckBox.is_checked / ComboBoxString.selected_option). | |
| include_bindings | No | Optional bool (default false): NOT implemented in this subset; sets bindings_note when true. | |
| include_geometry | No | Optional bool (default false): include GetCachedGeometry()-derived absolute_position/absolute_size, render_opacity, and render_transform. | |
| include_visibility | No | Optional bool (default true): include visibility, is_hovered and has_keyboard_focus per widget. has_keyboard_focus is what tells you whether a navigation key will do anything at all: with nothing focused every key is a no-op, which reads exactly like broken navigation. |