This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this function requires the UserInterfaceSettings header to be included | |
#include Runtime/Engine/Classes/Engine/UserInterfaceSettings.h | |
// this function can be marked as Blueprint Pure in its declaration, as it simply returns a float | |
float MyBPFL::GetUMG_DPI_Scale() { | |
// need a variable here to pass to the GetViewportSize function | |
FVector2D viewportSize; | |
// as this function returns through the parameter, we just need to call it by passing in our FVector2D variable | |
GEngine->GameViewport->GetViewportSize(viewportSize); |