Launch a PIE session with the plugin enabled, and with the default settings
Bring up the imgui demo window, notice that it's tiny
Open the UnrealImgui Project Settings page, and dirty the DPICurve, observe that the demo window doubles in size.
GEngine is invalid at this point because the plugin is set to the PreDefault loading phase, and the callstack to get into CalculateResolutionBasedScale runs via module load. We had tried changing the LoadingPhase which also fixed it but resulted in other issues.
This code is just taken from the call to GetDesktopResolution(), that function does a little more to fallback if SlateApplication is not initialized, but that doesn't seem to be necessary here.
Problem & Repro steps are:
GEngine is invalid at this point because the plugin is set to the PreDefault loading phase, and the callstack to get into CalculateResolutionBasedScale runs via module load. We had tried changing the LoadingPhase which also fixed it but resulted in other issues.
This code is just taken from the call to GetDesktopResolution(), that function does a little more to fallback if SlateApplication is not initialized, but that doesn't seem to be necessary here.