UCommonActivatableWidgetContainerBase::AddWidget

Generates (either creates or pulls from the inactive pool) instance of the given widget class and adds it to the container.

Windows
MacOS
Linux

References

Module

CommonUI

Header

/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/Widgets/CommonActivatableWidgetContainer.h

Include

#include "Widgets/CommonActivatableWidgetContainer.h"

Syntax

template<typename ActivatableWidgetT>
ActivatableWidgetT * AddWidget
(
    TSubclassOf< UCommonActivatableWidget > ActivatableWidgetClass,
    TFunctionRef< void> InstanceInitFunc
)

Remarks

Generates (either creates or pulls from the inactive pool) instance of the given widget class and adds it to the container. The provided lambda is called after the instance has been generated and before it is actually added to the container. So if you've got setup to do on the instance before it potentially activates, the lambda is the place to do it.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss