Widgets
Create and control Unreal UMG widgets from Lua.
The widget API operates on the game's real UMG objects. Returned widgets are normal UObjectProxy values, so reflected functions such as SetText, SetVisibility, and Blueprint-defined functions work directly.
Available Functions
| Function | Description |
|---|---|
widgets.create | Create a Widget Blueprint instance. |
widgets.find | Find a named Widget Tree control. |
widgets.add_to_viewport | Add a widget to the viewport. |
widgets.remove | Remove a widget from its parent. |
widgets.on | Observe a supported UI event. |
widgets.watch | Watch a reflected property. |
widgets.watch_function | Watch a zero-argument getter. |
widgets.off | Remove a watch or event binding. |
widgets.bind_native | Bind an exact native delegate. |
widgets.unbind_native | Remove a native widget binding. |
Event helpers
| Helpers | Event |
|---|---|
on_click, on_pressed, on_released | Button interaction |
on_hover, on_unhover | Hover state |
on_focus, on_blur | Keyboard focus |
on_value_changed | Slider and numeric values |
on_check_state_changed | Check boxes |
on_selection_changed | Combo boxes |
on_text_changed | Editable text |
on_visibility_changed, on_enabled_changed | General widget state |