Navigation
Unreal Engine C++ API Reference > Runtime > UMG > Components > UWidget
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 |
TSharedRef< SWidget > TakeWidget&40;&41;
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 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.