So I’m trying to make a resolution option, and the obvious looking function to use is RHIGetAvailableResolutions.
Here’s how I called it:
FScreenResolutionArray resArray = FScreenResolutionArray();
RHIGetAvailableResolutions(resArray, true);
resolutionArray = resArray;
FScreenResolutionArray::TIterator resItr = resArray.CreateIterator();
while (resItr)
{
FScreenResolutionRHI cRes = *resItr;
FString resString = FString::FromInt(cRes.Width) + FString("x") + FString::FromInt(cRes.Height);
TSharedPtr<FString> tempShared = MakeShareable<FString>(new FString(resString));
resolutionOptions.Add(tempShared);
++resItr;
}
Unfortunately it doesn’t seem to work (resArray is empty), am I doing something wrong? Do I need to call it from somewhere specific?