Search Issue Tracker
Unmaximizing Editor Window results in a new window being created and deleted
How to reproduce:
1. Open attached project "Maximising EditorWindow Loses Static Instance.zip"
2. In Editor, click Test -> My Window
3. Observe newly-created window -> "Instance" field (the field is set)
4. Dock the window next to the Scene and Game windows
5. Right-click and Maximise it
6. Right-click and Un-Maximise it
7. Observe the Console window
7. It apparently creates a new window because "Set Instance = 1 (NewBehaviourScript)" gets logged.
7. But then it logs "OnDestroy 1" meaning the new window was immediately destroyed (not the old one).
8. And since step 6 set that new window as the static instance, it is now null so it stops working as a singleton.
Expected result: "Set Instance = 1" and "OnDestroy 0" are printed
Actual result: "Set Instance = 1" and "OnDestroy 1" are printed
Reproducible with: 2017.4.36f1, 2018.4.16f1, 2019.2.20f1, 2019.3.0f6, 2020.1.0a21
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Rider package is not loaded until there are compilation errors in Assets
- [Catalina] DriveInfo.AvailableFreeSpace returns 0 on macOS Catalina
- IndirectArgs do not bind properly when using DX12
- [OSX] Editor windows flicker in Play Mode when dragging and docking windows with Metal Editor Support enabled
- Popup Window propagates input in its calling Window underneath and all other Windows