UWidget::TakeWidget

Gets the underlying slate widget or constructs it if it doesn't exist.

Windows
MacOS
Linux

References

Module

UMG

Header

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

Include

#include "Components/Widget.h"

Source

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

Syntax

TSharedRef< SWidget > TakeWidget()

Remarks

Gets the underlying slate widget or constructs it if it doesn't exist. If you're looking to replace what slate widget gets constructed look for RebuildWidget. For extremely special cases where you actually need to change the the GC Root widget of the constructed User Widget - you need to use TakeDerivedWidget you must also take care to not call TakeWidget before calling TakeDerivedWidget, as that would put the wrong expected wrapper around the resulting widget being constructed.

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