Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/UWidgetLayoutLibrary
Description
Returns design-time preview information from the UMG Designer. Use this in PreConstruct to adapt widget layout to the designer's current preview dimensions (e.g., switching between portrait and landscape layouts).
Logs an error and returns zeroed values if called outside of a design-time preview (e.g., at runtime or from a non-preview context). Use viewport/display system queries instead for runtime orientation.
| Name | GetDesignTimeInfo |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetLayoutLibrary.h |
| Include Path | #include "Blueprint/WidgetLayoutLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetLayoutLibrary.cpp |
UFUNCTION (BlueprintPure, Category="Design Time", Meta=(DefaultToSelf="Widget"))
static FWidgetDesignTimeInfo GetDesignTimeInfo
(
const UWidget * Widget
)
Parameters
| Name | Remarks |
|---|---|
| Widget | The calling widget (auto-filled via DefaultToSelf). |