UGameViewportClient::GetPixelSizeOfScreen

Get the total pixel size of the screen.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/GameViewportClient.h

Include

#include "Engine/GameViewportClient.h"

Source

/Engine/Source/Runtime/Engine/Private/GameViewportClient.cpp

Syntax

void GetPixelSizeOfScreen
(
    float & Width,
    float & Height,
    UCanvas * Canvas,
    int32 LocalPlayerIndex
)

Remarks

Get the total pixel size of the screen. This is different from the pixel size of the viewport since we could be in splitscreen