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

FunctionDescription
widgets.createCreate a Widget Blueprint instance.
widgets.findFind a named Widget Tree control.
widgets.add_to_viewportAdd a widget to the viewport.
widgets.removeRemove a widget from its parent.
widgets.onObserve a supported UI event.
widgets.watchWatch a reflected property.
widgets.watch_functionWatch a zero-argument getter.
widgets.offRemove a watch or event binding.
widgets.bind_nativeBind an exact native delegate.
widgets.unbind_nativeRemove a native widget binding.

Event helpers

HelpersEvent
on_click, on_pressed, on_releasedButton interaction
on_hover, on_unhoverHover state
on_focus, on_blurKeyboard focus
on_value_changedSlider and numeric values
on_check_state_changedCheck boxes
on_selection_changedCombo boxes
on_text_changedEditable text
on_visibility_changed, on_enabled_changedGeneral widget state

On this page