Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.16f1
2022.2.2f1
2023.1.0a25
2023.2.0a1
2023.3.0a3
Issue ID
UUM-22541
Regression
No
"UnityEngine.Device.Screen.resolutions" returns the resolution that was once set with "Screen.SetResolution"
How to reproduce:
1. Open the user’s attached “Device Simulator Test.zip“ project
2. In the Device Simulator window select any device
3. See that resolution printed in the Console window is ~1000x800 (depending on the device)
4. Toggle the “Set Resolution“ box in the Hierarchy > Main Camera > New Behaviour Script
5. See that resolution printed in the Console window is 8192x4048
6. Toggle the “Set Resolution“ box in the Hierarchy > Main Camera > New Behaviour Script again
7. Observe the Console window
Expected result: The resolution printed in the console window is ~1000x800 (depending on the device)
Actual result: The resolution printed in the Console window is 8192x4048
Reproducible with: built-in (2021.3.16f1, 2022.2.2f1, 2023.1.0a25)
Couldn’t test with: 3.0.3-preview (2020.3.44f1) (Scripting errors after downgrade)
Note: restarting the editor doesn't fix the issue
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Changing the device will reset the value, as will restarting the editor. Make sure in test projects that the boolean that checks whether the call SetResolution call is done is disabled before restarting the editor or changing devices, or the call will be made again.