Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
0
Found in
2021.3.29f1
2022.3.7f1
2023.1.9f1
2023.2.0b5
2023.3.0a5
Issue ID
UUM-46717
Regression
No
Screen resolution calculated via Screen.currentResolution or Screen.width/height are not updated when switching the monitor
Reproduction steps:
1. Open the attached project “PreviousResolution”
2. Build and Run (File > Build And Run)
3. In the Player observe three blocks in the top left corner, which show screen resolutions (all shown resolutions should be the same)
4. Move the Player to the other screen ( Shift + Windows key + arrow button)
5. Observe the three blocks in the top left corner
Expected result: All shown resolutions are the same
Actual result: “Current Resolution” and “Screen Dimensions” blocks are showing the resolution of the previous screen
Reproducible with: 2021.3.29f1, 2022.3.7f1, 2023.1.9f1, 2023.2.0b5
Reproducible on: Windows 11
Not reproducible on: Intel macOS 13.4.1 (c)
Note:
At least two screens are needed to reproduce the issue
The Player has to be in fullscreen mode
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
After looking into this, we are closing this bug as this functionality is intended. When changing
resolutions of the application (which happens when changing between displays with different
resolutions in full screen mode), it takes a frame to update as documented here:
https://docs.unity3d.com/ScriptReference/Screen.SetResolution.html. This also means the
Screen.currentResolution and Screen.width/height APIs also take a frame to update as these
APIs are based on the current resolution of the application. On the other hand
Screen.mainWindowsDisplayInfo purely returns the information of the current display, which
windows does almost instantaneously. The bug report exploits this 1 frame difference, which
causes the behavior.
Resolution Note (2023.3.X):
After looking into this, we are closing this bug as this functionality is intended. When changing
resolutions of the application (which happens when changing between displays with different
resolutions in full screen mode), it takes a frame to update as documented here:
https://docs.unity3d.com/ScriptReference/Screen.SetResolution.html. This also means the
Screen.currentResolution and Screen.width/height APIs also take a frame to update as these
APIs are based on the current resolution of the application. On the other hand
Screen.mainWindowsDisplayInfo purely returns the information of the current display, which
windows does almost instantaneously. The bug report exploits this 1 frame difference, which
causes the behavior.