Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Blueprint > API/Runtime/UMG/Blueprint/UGameViewportSubsystem
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Blueprint/GameViewportSubsystem.h |
| Include | #include "Blueprint/GameViewportSubsystem.h" |
| Source | /Engine/Source/Runtime/UMG/Private/Blueprint/GameViewportSubsystem.cpp |
UFUNCTION (BlueprintCallable, Category="GameViewportWidgetSlot")
static FGameViewportWidgetSlot SetWidgetSlotPosition
(
FGameViewportWidgetSlot Slot,
const UWidget * Widget,
FVector2D Position,
bool bRemoveDPIScale
)
Remarks
Helper function to set the position in the viewport for the Slot.
Parameters
| Name | Description |
|---|---|
| Position | The 2D position to set the widget to in the viewport. |
| bRemoveDPIScale | If you've already calculated inverse DPI, set this to false. Otherwise inverse DPI is applied to the position so that when the location is scaled by DPI, it ends up in the expected position. |