Get ViewPort size issue

I try to get current monitor resolution with next code (see below), but always return 0,0. How to get viewport (monitor) resolution from C++?

method1:

const FIntPoint ViewportSize = GEngine->GameViewport->Viewport->GetSizeXY();
FString desktopRes = FString("ViewPort size: ") + FString::FromInt(ViewportSize.X) + FString("x") + FString::FromInt(ViewportSize.Y);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, desktopRes);

method2 (from PlayerController):

APlayerController* PController = UGameplayStatics::GetPlayerController(GetWorld(), 0);
int32 sizeX, sizeY;
PController->GetViewportSize(sizeX, sizeY);
FString desktopRes = FString("ViewPort size1: ") + FString::FromInt(sizeX) + FString("x") + FString::FromInt(sizeY);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, desktopRes);

May be i get viewport (current monitor) resolution via RHI?

bump!

How to detect user desktop screen resolution?

For example from the ShooterGame:

UserSettings = CastChecked<UShooterGameUserSettings>(GEngine->GetGameUserSettings());
	ResolutionOpt = UserSettings->GetScreenResolution();

After two days of hard drilling and experements there is my solution how to get user current (fullscreen) native desktop resolution:

UGameViewportClient *vpcl = GEngine->GameViewport;
FSlateRect Rect = vpcl->GetWindow()->GetFullScreenInfo();
FVector2D ResolutionOpt = Rect.GetSize();