FUserWidgetPool::GetOrCreateInstance

Gets an instance of a widget of the given class.

Windows
MacOS
Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Blueprint/UserWidgetPool.h

Include

#include "Blueprint/UserWidgetPool.h"

Syntax

template<typename UserWidgetT>
UserWidgetT * GetOrCreateInstance
(
    TSubclassOf< UserWidgetT > WidgetClass
)

Remarks

Gets an instance of a widget of the given class. The underlying slate is stored automatically as well, so the returned widget is fully constructed and GetCachedWidget will return a valid SWidget.

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