Navigation
API > API/Plugins > API/Plugins/CommonUI > API/Plugins/CommonUI/UCommonActivatableWidgetContaine-
Description
Adds a widget of the given class to the container. Note that all widgets added to the container are pooled, so the caller should not try to cache and re-use the created widget.
It is possible for multiple instances of the same class to be added to the container at once, so any instance created in the past is not guaranteed to be the one returned this time.
So in practice, you should not trust that any prior state has been retained on the returned widget, and establish all appropriate properties every time.
| Name | BP_AddWidget |
| Type | function |
| Header File | /Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Public/Widgets/CommonActivatableWidgetContainer.h |
| Include Path | #include "Widgets/CommonActivatableWidgetContainer.h" |
| Source | /Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Private/Widgets/CommonActivatableWidgetContainer.cpp |
UFUNCTION (BlueprintCallable, Category=ActivatableWidgetStack,
Meta=(DeterminesOutputType=ActivatableWidgetClass, DisplayName="Push Widget"))
UCommonActivatableWidget * BP_AddWidget
(
TSubclassOf < UCommonActivatableWidget > ActivatableWidgetClass
)