Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.2
2021.2.8f1
2022.1
2022.2
Issue ID
1408548
Regression
No
OnEnable and OnDisable are called when minimizing the custom Editor window
Reproduction steps:
1. Open the user's attached "1167530-MaximizingWindow.zip" project
2. Open the "TestWindow" window (Window -> My Window)
3. See that "OnEnable" is called in the Console window
4. Drag and drop the "TestWindow" tab in the Tab Area of an existing window
5. Enable and disable the "Maximize" option for the "TestWindow" window (Right-click -> Maximize)
6. Observe the Console window
Expected result: OnEnable and OnDisable are not called
Actual result: OnEnable and OnDisable are called
Reproducible with: 2019.4.36f1, 2020.3.30f1, 2021.2.14f1, 2022.1.0b10, 2022.2.0a7
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
- Crash on ResizeScriptingList<ScriptingObjectPtr> when passing an undeclared variable to the results parameter for GameObject.FindGameObjectsWithTag
- [Android] "Screen.safeArea.y" always returns values outside of the Safe Area when the device is in Portrait orientation
- Frame spike due to many TreeRenderer.TreeUpdated calls when repositioning terrains in large Scenes
- Crash on GameObject::RemoveComponentFromGameObjectInternal when reparenting Text GameObjects
- [IL2CPP-GarbageCollector] Changing GCMode might permanently disable GC in a multithreaded context
Resolution Note:
This is by design. When a window gets docked and undocked. It is possible the system serialize and deserialize the editor window.