CreateGUI not being called

I have a very simple EditorWindow built using UiBuilder.

This has happened twice now, after hours of development, suddenly ‘CreateGUI’ stops being called, and I have no way of fixing it, last time I had to clear the project and start from scratch.

I have confirmed my GetWindow() static function is getting called, but neither OnEnable nor CreateGUI gets invoked after that. And I can’t see any errors in the console…

How can I debug this?

I really don’t want to start the project again, but I can’t get my editor window back :frowning:

OK, well it does get called but only after the assembly is reloaded (modify script, recompile), but the window just won’t show up anywhere.

Crisis aborted, I switched layouts and now it’s returning back as normal, Hoorar!

This is a BUUUUGGGG that should be addressed, spent hours tracking this down in 2021 and i see references to it back to 2014 or earlier.

At some point when developing UI for the editor unity caches a bad or offscreen or whatever version and there is ZERO indication as to what is going on.

Changing layouts is the ONLY way to fix this and yet is clearly a bug, not something a teammate did wrong. Works for others but not for them, etc. Impossible to find root cause until you google enough and everyones time is wasted, no bueno.

Fix please!!!

switching layout works for me. thx.

Hello, I would like to ask what it means to **switching the layout?**I resized the size and order of the elements, but it didn’t work.I want to know what to do to make my window display normally.Thanks!

in the top right of the editor window there is a layout drop down box where you can select from various layouts, and a reset to default.

Thanks for your answers! But I reset the layout, the above problems still exist, how can I solve this?:frowning:

Hello! :sweat_smile:I reset the layout, but my window still doesn’t appear and the CreateGUI isn’t called. I’d love to know how you solved this problem?:frowning:

@tongshuqi Could you submit a repro project through the bug reporter? You can find it under Help>Report a bug… Thanks!
Please also include the files under
C:\Users<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts