Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2020.3.X, 2021.1.X, 2021.2.X
Votes
0
Found in
2019.4
2020.3
2020.3.11f1
2021.1
2021.2
2022.1
Issue ID
1345508
Regression
No
[Android] Display.systemWidth/Height value isn't updated when the phone is folded/unfolded
Reproduction steps:
1. Open the attached user's project "SystemResFoldable.zip"
2. Build the project on the device unfolded, notice the resolution
3. Fold it and see how the resolution doesn't change
4. Without unfolding the device, exit the app and run it again
5. Notice that the resolution is smaller than before
6. Unfold it, notice how it still shows the folded resolution
Expected result: Display.systemWidth/Height value updates when the phone is folded/unfolded
Actual result: Display.systemWidth/Height value isn't updated when the phone is folded/unfolded
Reproduces on: 2019.4.29f1, 2020.3.14f1, 2021.1.14f1, 2021.2.0b1, 2022.1.0a1
Reproducible with these devices:
N/A, Samsung Galaxy Z Fold2 5G (SM-F916U), Android 10, CPU: Snapdragon 865 SM8250, GPU: Adreno (TM) 650
Notes:
-Customer mentioned that it also reproduce on an Emulator
-Issue is still reproducible when Resizable Window is turned on in the Player Settings under Resolution and Presentation
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a4. Display.systemWidth, Display.systemHeight and Screen.resolutions[] are now updated when folding/unfolding a Galaxy Fold device.
However Display.main.systemWidth/Height return the result (widthPixels, heightPixels) of https://developer.android.com/reference/android/view/Display#getRealMetrics(android.util.DisplayMetrics). These only reflect the metric of the full unfolded screen of a Galaxy Z Fold2 after unfolding if the app is "resizable". Screen.resolutions[] should list the actual display resolution.
Resolution Note (fix version 2021.2):
Fixed in 2021.2.2f1
Resolution Note (fix version 2021.1):
Fixed in 2021.126f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.22f1