GenerateConvenientWindowedResolutions not found

I’m upgrading from 4.16 to 4.18. I’m having trouble with this function call “GenerateConvenientWindowedResolutions(…)” which is giving an identifier not found error. The section of code is this:



        TArray<FIntPoint> GenResolutions;
        FDisplayMetrics DisplayMetrics;

        FDisplayMetrics::GetDisplayMetrics(DisplayMetrics);
        GenerateConvenientWindowedResolutions(DisplayMetrics, GenResolutions);


Adding the header “Misc/CoreMisc.h” to the includes didn’t help. What happened here? This used to compile and work just fine.

Looks like this function only exists in GameEngine.cpp, to access it elsewhere you would have to move the declaration to a header.

The declaration is in CoreMisc.h, but it still comes up “identifier not found”. The question is what changed between 4.16 and 4.18 that’s now preventing the code from compiling.

Not for me. Are you sure you’re looking at the correct version of the source?

However, it looks like a new method was exposed elsewhere to do this now: UKismetSystemLibrary::GetConvenientWindowedResolutions

I’m looking at the header files for CoreMisc.h which is where that function used to be defined. It looks like it was removed in 4.18. They may have moved it to Kismet.