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
- UI Toolkit Slider value defaults to min value when the initial value is set in the UXML file
- The Player hangs when unloading a scene using the UnloadUnusedAssets() method
- [iOS] Too many texture parameters error is thrown when running on devices that support the number of parameters
- [MacOS] Trying to pick a Colour from full-screen window breaks Colour Picker Tool functionality
- WebGL Player hangs on first frame when "Autoconnect Profiler" is enabled and large amount of Profiler data is buffered before the first frame
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.