- Home /
Resolution inconsistency on Huawei P20
Hello, I am using Unity 2019.3.1f I am experiencing strange resolution behavior when running my game on Huawei P20. I checked the specs and I know my Huawei P20 native resolution is 1080x2240. Unfortunately, when I play my game on the device it uses weird resolution 720x1496 (which is exactly 1.5 times smaller than the desired one). I tried printing out the current resolution and the native resolution using this code:
Debug.Log($"Current resolution: {Screen.currentResolution}");
Debug.Log($"Native resolution: {(Display.main.systemWidth, Display.main.systemHeight)}");
And this is the result:
After that, I tried setting the resolution to the correct one with this code:
Debug.LogWarning($"Setting resolution to: {(1080, 2240)}");
Screen.SetResolution(1080, 2240, false);
And the result was exactly what I was expecting:
It seems to me that Unity does not detect the native Huawei P20 resolution properly. I have not tested on any other android devices yet, but everything works perfectly on iOS devices Do you have any idea what could be wrong
android phones when battery saver is enabled reduce the resolution from fhd to hd, maybe thats the issue?
Answer by S0paTa · Aug 08, 2020 at 12:09 PM
Thank you @xxmariofer You are a life-saver! For future google travelers - the issue was that in battery saving options, under "Screen Resolution", I had enabled the HD+ option instead of FHD+ option.