Search Issue Tracker
Won't Fix
Won't Fix in 6000.1.X
Votes
0
Found in
6000.0.18f1
6000.1.0a7
Issue ID
UUM-79352
Regression
Yes
OnBecameVisible is called before OnEnable for EditorWindows when a domain reload is triggered
How to reproduce:
1. Open the attached “IN-83642“ project
2. Select “Bugreport → Open Window” from the menu bar
3. Observe the order of messages in the Console window (OnEnable → OnBecameVisible)
4. Navigate to “Assets/Editor” in the Project window
5. Right-click the “TestWindow” script and select “Reimport”
6. Observe the Console window
Expected result: OnEnable is called before OnBecameVisible
Actual result: OnBecameVisible is called before OnEnable
Reproducible in: 6000.0.18f1
Not reproducible in: 2021.3.43f1, 2022.3.45f1 (see note about regression)
Reproducible on: Windows 10, Windows 11
Not reproducible on: No other environments tested
Notes:
- in 2021.3.43f1 and 2022.3.45f1, if the project is closed, and then reopened with the window open, OnBecameVisible is called before OnEnable
- There is a regression somewhere between the Unity 2021.3/2022.3 and Unity 6 versions, but test results become inconsistent somewhere around the 2023.2 alpha and beta streams making it difficult to pin down the first affected version
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
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
Resolution Note:
After discussion with other developers it was decided that this issue won't be fixed due to being a high risk corner case. For now, please keep in mind that on domain reload, If window is not present, OnEnable will be called before OnBecameVisible, but if window is already visible, OnBecameVisible will get called first.
Resolution Note (6000.1.X):
After discussion with other developers it was decided that this issue won't be fixed due to being a high risk corner case. For now, please keep in mind that on domain reload, If window is not present, OnEnable will be called before OnBecameVisible, but if window is already visible, OnBecameVisible will get called first.