Search Issue Tracker
Fixed in 2022.1.X
Votes
0
Found in
2018.4
2019.4
2020.3
2021.1
2021.2
2021.2.0a15
Issue ID
1335981
Regression
No
[Simulator] Wrong Screen.width/height values returned in OnEnable when reenabling a monobehavior in the editor during PlayMode
How to reproduce:
1. Open attached project "BadResolution.zip"
2. Open "SampleScene" scene
3. Enter Play Mode
4. Select "Script" Game Object in the Hierarchy window
5. Disable "Find Resolution Printer" component in the Inspector window
6. Enable "Find Resolution Printer" component in the Inspector window
7. Observe the Console window
Expected result: The resolution printed is the same as the resolution printed at the start of the Play Mode
Actual result: The resolution printed is different
Reproducible with - 2018.4.35f1, 2019.4.27f1, 2020.3.9f1, 2021.1.8f1, 2021.2.0a17
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
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a13
Was not able to fix UnityEngine.Screen behavior, but fixed UnityEngine.Device.Screen behavior to be stable when using Device Simulator. Won't work with Game window and won't work with UnityEngine.Screen.