// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyFunctionLibrary.generated.h"
/**
*
*/
UCLASS()
class NEW53TEST_API UMyFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable)
static FVector2D etCurrentScreenResolution();
};
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyFunctionLibrary.h"
//#include "GameFramework/GameUserSettings.h"
#include <Windows.h>
//#include <iostream>
FVector2D UMyFunctionLibrary::etCurrentScreenResolution()
{
//FIntPoint resolution = GEngine->GetGameUserSettings()->GetScreenResolution();
//GEngine->GetGameUserSettings()->ApplySettings(true);
int width = GetSystemMetrics(SM_CXSCREEN);
int height = GetSystemMetrics(SM_CYSCREEN);
FVector2D resolution2D(width,height);
return resolution2D;
}