Navigation
API > API/Editor > API/Editor/UMGEditor > API/Editor/UMGEditor/FWidgetBlueprintOperationUtils
Description
Replaces a single-child panel widget with its child, preserving named-slot host wiring and parent linkage. The widget to replace must be a UPanelWidget with exactly one child.
| Name | ReplaceWidgetWithChild |
| Type | function |
| Header File | /Engine/Source/Editor/UMGEditor/Public/WidgetBlueprintOperationUtils.h |
| Include Path | #include "WidgetBlueprintOperationUtils.h" |
| Source | /Engine/Source/Editor/UMGEditor/Private/WidgetBlueprintOperationUtils.cpp |
static bool ReplaceWidgetWithChild
(
UWidgetBlueprint * WidgetBlueprint,
UWidget * WidgetToReplace,
FText & OutErrorMessage
)
true on success, false if validation failed (no side effects on failure).
Parameters
| Name | Remarks |
|---|---|
| WidgetBlueprint | The widget blueprint containing the panel widget. |
| WidgetToReplace | The panel widget (must be a UPanelWidget with exactly one child and in WidgetBlueprint's tree). |
| OutErrorMessage | Filled on failure with a description of what went wrong. |