UUserWidget::SetPositionInViewport

Sets the widgets position in the viewport.

Windows
MacOS
Linux

References

Module

UMG

Header

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

Include

#include "Blueprint/UserWidget.h"

Source

/Engine/Source/Runtime/UMG/Private/UserWidget.cpp

Syntax

void SetPositionInViewport
(
    FVector2D Position,
    bool bRemoveDPIScale
)

Remarks

Sets the widgets position in the viewport.

Parameters

Parameter

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.

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