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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.