Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.46f1
2022.3.54f1
6000.0.30f1
6000.1.0a7
6000.2.0a1
Issue ID
UUM-90581
Regression
No
Screen.safeArea returns wrong values when called in Awake upon loading another Scene
Reproduction steps:
1. Open the attached “Test.zip” project
2. Open the “Assets/Scenes/SampleScene“ Scene
3. Enter Play Mode
4. Observe the “awake area=…“ log resolution values in the Console
5. In the Game View window, press the button in the center
6. Observe the new “awake area=…” log values
7. Compare the step 4 and step 6 values
Expected result: The values match and are the same as the Aspect Ratio of the Game View
Actual result: The values in step 7 are different and are dependent on the size of the Game View window
Reproducible with: 2021.3.46f1, 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: macOS Sequoia 15.1.1
Not reproducible on: Windows 11, Ubuntu 24.04
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
- CPU frame times spike at regular intervals in the Profiler when in Play mode with VSync enabled and using DX12 API
- UI Builder “Create Template” Fails with Invalid UXML and Missing Root Element Errors
- Decal not projected on top of a Lit Material when MSAA is disabled, and Rendering Path is Forward or Forward+ in a Standalone Build
- Separation lines between minimized fields become invisible when scrolling in the Profiler
- Drag & drop and object picker assignment fail when ExposedReference variables are used in a Timeline clip
Resolution Note:
The getSafeArea method gives incorrect values if called from Awake() during a scene load. This happens because Awake() runs before the new scene is completely ready and platform details are available.This isn't a bug. Awake() is meant for a script's own initial setup and is simply too early to get reliable data that depends on the fully loaded scene.
To get the correct values, call getSafeArea in Start() or a later method, when the scene is guaranteed to be fully initialised.