Search Issue Tracker

By Design

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

  1. 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.

Comments (1)

  1. brandoncopler026

    Aug 21, 2023 12:44

    Recently I was a victim of CATLY scam and lost my life savings of about 347k, I went into depression and was afraid of telling anyone. All these happened so fast, I couldn't believe my eyes, I did some research and decided to contact Hackwest At Writeme Dot Com, after asking some few questions and told me everything he will do to recover my money which I did; few days after my USDT was recovered back into my wallet. I can't thank this genius enough and I highly recommend everyone in need of help to write them immediately. Don't forget to let Hack West know Brandon referred you and be assured of their excellent and reliable service.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.