Hi! I’m building a pure Slate-based application using Unreal Engine 5.5 on macOS, and I’ve encountered a persistent DPI-related issue in the Game (standalone) build.
In Unreal Editor, everything works perfectly — the DPI scale is correctly set to 2.0
on my Retina display, and the UI looks crisp and sharp.
However, in the standalone Game build the initial dpi_scale
returned from FPlatformApplicationMisc::GetDPIScaleFactorAtPoint(0, 0)
was always 1.0
, and everything looked blurry and downscaled.
To force DPI into working, I did the following:
-
Enabled “Enable High DPI in Game” in the project settings → it added
bAllowHighDPIInGameMode=True
toDefaultEngine.ini
-
Called
FSlateApplication::Get().InitHighDPI(true);
in my GameInstance before creating any windows -
Set
NSHighResolutionCapable = YES
inInfo.plist
After that, the dpi_scale
finally became 2.0
, which is what I expected. But new problems appeared:
-
The reported screen size from
FSlateApplication::Get().GetDisplayMetrics(...)
was now only1512 x 982
instead of the actual3024 x 1964
-
As a result, the application windows were initialized at half the intended size, even though
dpi_scale == 2.0
-
Manually resizing the window with the mouse revealed that the UI was correctly Retina-scaled, but the initial sizing and layout were wrong
This leads me to think DPI is only partially working — the rendering is correct, but Slate still uses logical resolution where it shouldn’t, or the metrics are mismatched.
How can I ensure that DPI is fully initialized, and that window sizing and layout reflect Retina resolution properly in standalone Game builds on macOS?
Thanks in advance!