unreal.UMGWidgetInfo¶
- class unreal.UMGWidgetInfo(widget: Widget = Ellipsis, parent: PanelWidget = Ellipsis, slot: PanelSlot = Ellipsis, named_slot_host: Widget = Ellipsis, widget_class_path: SoftClassPath = Ellipsis, widget_name: Name = 'None', is_variable: bool = False, inherited: bool = False, ui_components: None = [])¶
Bases:
StructBaseWidget info with hierarchy pointers. Returned by all widget query and creation functions. All TObjectPtr fields serialize as {“refPath”: “…”} - pass them directly back to other functions.
- Reading properties:
ObjectTools.list_properties(Widget) -> get exact property names
ObjectTools.get_properties(Widget, [names]) -> read current values
ObjectTools.set_properties(Widget, {name: value}) -> write values
Do the same for the Slot pointer to set padding, alignment, anchors, etc. Get property names via ObjectTools.list_properties - they vary per widget class.
- Hierarchy context:
Parent set -> widget was added as a child of this panel
NamedSlotHost set -> widget is named slot content on this host
Both null -> root widget
bInherited true -> defined in the C++ parent class, not user-created
C++ Source:
Plugin: UMGToolSet
Module: UMGToolSet
File: UMGToolSet.h
Editor Properties: (see get_editor_property/set_editor_property)
inherited(bool): [Read-Write] True if this widget is inherited from the C++ parent class.is_variable(bool): [Read-Write] Whether this widget is exposed as a blueprint variable.named_slot_host(Widget): [Read-Write] Named slot host. If set, this widget is named slot content - use SetNamedSlotContent with this host instead of AddWidget. Call GetNamedSlots to find the slot name.parent(PanelWidget): [Read-Write] Parent panel widget. nullptr when this is the root widget or when this widget lives in a named slot (check NamedSlotHost instead).slot(PanelSlot): [Read-Write] Panel slot for this widget. Pass to ObjectTools to read/write slot properties (padding, alignment, anchors, etc.). nullptr for root widget.ui_components(Array[UMGUIComponentInfo]): [Read-Write] UI components attached to this widget, in display order. Pass ComponentClass entries back to AddUIComponent / RemoveUIComponent / MoveUIComponent.widget(Widget): [Read-Write] The widget instance. Pass to AddWidget as parent, ObjectTools for properties.widget_class_path(SoftClassPath): [Read-Write] Class path for this widget. Pass directly to AddWidget or SetNamedSlotContent WidgetClass param.widget_name(Name): [Read-Write] Widget instance name.
- property inherited: bool¶
[Read-Only] True if this widget is inherited from the C++ parent class.
- Type:
(bool)
- property is_variable: bool¶
[Read-Only] Whether this widget is exposed as a blueprint variable.
- Type:
(bool)
- property named_slot_host: Widget¶
[Read-Only] Named slot host. If set, this widget is named slot content - use SetNamedSlotContent with this host instead of AddWidget. Call GetNamedSlots to find the slot name.
- Type:
(Widget)
- property parent: PanelWidget¶
[Read-Only] Parent panel widget. nullptr when this is the root widget or when this widget lives in a named slot (check NamedSlotHost instead).
- Type:
- property slot: PanelSlot¶
[Read-Only] Panel slot for this widget. Pass to ObjectTools to read/write slot properties (padding, alignment, anchors, etc.). nullptr for root widget.
- Type:
- property ui_components: None¶
[Read-Only] UI components attached to this widget, in display order. Pass ComponentClass entries back to AddUIComponent / RemoveUIComponent / MoveUIComponent.
- Type:
- property widget: Widget¶
[Read-Only] The widget instance. Pass to AddWidget as parent, ObjectTools for properties.
- Type:
(Widget)
- property widget_class_path: SoftClassPath¶
[Read-Only] Class path for this widget. Pass directly to AddWidget or SetNamedSlotContent WidgetClass param.
- Type: