I’ve made some changes, and now I get “Unrecognized type ‘UDisplayInfo’ - type must be a UCLASS, USTRUCT or UENUM” on the static GetDisplayResolutions line. But, UDisplayInfo is an USTRUCT.
#include “Display.generated.h”
#pragma once
UCLASS(Blueprintable)
class CARZ_API UDisplay : public UObject
{
public:
GENERATED_BODY()
UDisplay();
~UDisplay();
UFUNCTION(BlueprintPure, Category = Utility)
static TArray<struct UDisplayInfo> GetDisplayResolutions();
};
USTRUCT(BlueprintType)
struct UDisplayInfo
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = DisplayInfo)
int32 Width;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = DisplayInfo)
int32 Height;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = DisplayInfo)
int32 RefreshRate;
UDisplayInfo()
{
Width = Height = RefreshRate = 0;
}
};