Search Issue Tracker
Won't Fix
Votes
1
Found in
2022.3.1f1
2023.1.0f1
2023.2.0a19
Issue ID
UUM-40102
Regression
No
Screen.currentResolution value returns the wrong value
How to reproduce:
1. Open the “Resolution_Bug“ project
2. Open the “MainMenu“ scene
3. Build And Run (File > Build And Run)
4. In Player navigate to the “Options“ menu
5. Untick the “Fullscren” field
6. Change the “Resolution” field to any other resolution
7. Select “Save Options” and select “Yes”
8. Observe the Player viewport
Expected result: “New Resolution” message is logged with the selected resolution
Actual result: “New Resolution” message is logged with the resolution of the monitor
Reproduced with: 2022.3.1f1, 2023.1.0f1, 2023.2.0a19
Could not test with: 2021.3.27f1 (Changing the resolution does not work)
Reproduced on: macOS 13.2.1 (Intel), Windows 10 (by reporter), Windows 11
Notes:
1. In 2023.1 and 2023.2 streams the resolutions are not displayed in Player but can be found in Player.log
2. In Windows Player.log can be found in User > AppData > LocalLow > DefaultCompany > RunHideWin
3. Cannot test in Editor as Screen.setResolution does not change the resolution of Game view
-
Emily60
Jun 14, 2023 09:23
Hi everyone I am Emily Naomi wanna give a big thanks to this wonderful psychic for bringing my husband back to me… I never really believed in magic spells or anything spiritual but a trusted friend opened my eyes to the truth about life. My marriage was heading to divorce a few months ago. I was so confused and devastated with no clue or help on how to prevent it, till I was introduced to this psychic Priest Ray that did a love spell and broke every spiritual distraction from my marriage. A day later my husband started showing me love and care even better than it used to be, he’s ready to talk things through and find ways for us to stay happy. It’s such a miracle that my marriage can be saved so quickly without stress. You can also contact him for help by email psychicspellshrine@usako. net
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
- Multiple errors appear when compiling a ShaderGraph shader's code in a specific project
- TextMeshPro memory leak occurs when reloading the scene using Addressables
- Vector3 node has no X, Y, Z outputs when adding Vector3 node in the Visual Effect Graph
- [Android] Error "Blitter is already initialized" is present when Adaptive Probe Volumes are used with OpenGLES3
- VFX Graph effect instance stops rendering when a second instance of the same effect starts 2 frames later
Resolution Note:
The bug is a result of a combination of user misunderstanding and an error in our API documentation for the Screen.setResolution function. The API documentation was mistakenly modified by our technical writer intern in a pull request (PR). In previous versions of Unity Docs (2021.2 and earlier), it states that when the player is in windowed mode, the function returns the current resolution of the desktop. However, in versions 2021.3 and later, it states that it returns the current dimensions of the game window in pixels and the display refresh rate when in windowed mode.
After consulting with the author of the code, our implementation of setResolution, regardless of the platform, always returns the desktop display resolution when in windowed mode, irrespective of the window size. To obtain the dimensions of the game window in pixels, users should utilize the Screen.width and Screen.height APIs instead.
In windowed mode, the concept of "resolution" does not exist for a Unity player. The Screen.resolutions API documentation explicitly states that it "Returns all full-screen resolutions that the monitor supports"
I have reached out to the documentation team to request a reversion of the documentation back to its original form.