UGameViewportClient::GetViewportSize

Retrieve the size of the main viewport.

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 GetViewportSize
(
    FVector2D & ViewportSize
) const

Remarks

Retrieve the size of the main viewport.

Parameters

Parameter

Description

out_ViewportSize

[out] will be filled in with the size of the main viewport