Search Issue Tracker
Won't Fix
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
- [Silicon] Crash with multiple StackTraces when entering Play Mode in a project with corrupted FBX files
- Index Out Of Range exception when trying to use Rendering Layer Override in Probe Adjustment Volume without a mask defined in lighting settings
- [Android] [Vulkan] [WebCamTexture] "WebCamTexture.Play" crashes the application when the camera is started
- Huge performance overheads appear when there is a large amount of bindings in the UI Toolkit
- Visual Effects Graph Blackboard can't be scrolled horizontally
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.