UPanelWidget::ReplaceChild

Swaps the child widget out of the slot, and replaces it with the new child widget.

Choose your operating system:

Windows

macOS

Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/PanelWidget.h

Include

#include "Components/PanelWidget.h"

Source

/Engine/Source/Runtime/UMG/Private/Components/PanelWidget.cpp

Syntax

virtual bool ReplaceChild
(
    UWidget * CurrentChild,
    UWidget * NewChild
)

Remarks

Swaps the child widget out of the slot, and replaces it with the new child widget.

Returns

true if the CurrentChild was found and the swap occurred, otherwise false.

Parameters

Parameter

Description

CurrentChild

The existing child widget being removed.

NewChild

The new child widget being inserted.