Skip to content
Jigwright
HullForge docs

Add Widget

Add a widget to a Widget Blueprint's hierarchy and VERIFY it is there afterwards by finding it in the tree and checking its parent. Appends to the end of the parent's children. Refuses a User Widget class, because constructing one needs a world that an asset edit does not have.

hf_add_widgetWrite

Arguments

NameTypeDescription
widget_blueprintreqstringWidgetBlueprint asset path.
widget_classreqstringWidget class. A bare name like TextBlock or Button is resolved against UMG; a full path such as /Script/UMG.SizeBox also works.
forceboolean
= false
Edit even when the asset cannot currently be saved - for example when revision control is configured but disconnected. The change will be made in memory and WILL BE LOST unless the underlying problem is fixed before saving. Only pass this if you intend to discard the work or fix the connection first.
namestringName for the new widget. Must be unique in this blueprint. Omitted means the engine picks one.
parentstringName of the panel widget to add it to. Omit only when the blueprint has no root yet, in which case the new widget becomes the root.

Nearby in UMG and UI: