- Home /
Error while reading window layout
I had the following error when I opened a previously working scene:
Error while reading window layout: window #13 is null
UnityEditor.WindowLayout:LoadWindowLayout(String)
Failed to load window layout: System.Exception: Exception of type 'System.Exception' was thrown.
at UnityEditor.WindowLayout.LoadWindowLayout (System.String path) [0x0011f] in C:\BuildAgent\work\b0bcff80449a48aa\Editor\Mono\GUI\WindowLayout.cs:518
UnityEditor.WindowLayout:LoadWindowLayout(String)
Failed to destroy editor windows: #7
ASMainWindow
ConsoleWindow
InspectorWindow
ProjectWindow
GameView
SceneView
HierarchyWindow
UnityEditor.WindowLayout:LoadWindowLayout(String)
Failed to destroy views: #12
SplitView
DockArea
SplitView
DockArea
DockArea
DockArea
MainWindow
Toolbar
SplitView
AppStatusBar
DockArea
DockArea
UnityEditor.WindowLayout:LoadWindowLayout(String)
I've had this happen once or twice before and it's really annoying. Is there any way to recover my window layouts or do I have to build it all again from scratch?
Answer by Xavis · Dec 09, 2014 at 10:38 AM
I get this problem solved renaming project folder and reopening it from Unity project selector.
Hope it helps!
tested in unity 5.3.4 on $$anonymous$$ac, does not work for me
Answer by wangzy_88 · Jan 23, 2013 at 06:53 AM
I have this problem because of my code have some syntax errors,when I fixed them,my layout set is useable.
Thats not an answer. The layout should not reset when you have a syntax error !
This is a unity bug needs fixing before 4.6 goes live this week.
Too late it's gone out. And here it is in the wild. I can't open one of my projects at all.
Can't help.Open a new project and import old things.Or Open script in explorer and fix your bug...
Answer by Hoorza · Oct 16, 2016 at 07:04 PM
Had the same problem, and solved it by renaming the projects folder like Xavis said. Thanks!
Just remember that it will not show in the quick start menu after you change the name. Chose OPEN from the greeting menu and find the newly named folder of your project, select it, do not enter it and than click CHOOSE FOLDER. Taaa Daaa.
Answer by chrisg5000 · Feb 27, 2017 at 02:33 PM
Still seeing this problem in 5.6 Renaming didn't work for me. Thanks to this thread I realized my custom window was being loaded into Unity's window layout, thus an instance always existed. Until this bug is fixed, I just made a key to DestroyImmediate() the instance:
if ( yourWindowHere != null )
{
Debug.Log ( "YourWindowHere IS NOT NULL!!! If it's expected to be, press F12 to destroy." );
if ( Input.GetKeyUp ( KeyCode.F12 ) )
{
DestroyImmediate ( yourWindowHere );
Debug.Log ( "YourWindowHere was destroyed. Have a nice day!" );
}
}
I'm pretty sure this happens when the compiler receives certain errors, I just can't figure out which ones.
Your answer
![](https://koobas.hobune.stream/wayback/20220613074624im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Stretchable textures in Editor 0 Answers
editor layout - how to put console back to a tab?? 2 Answers
Get height of a group of GUILayout controls 1 Answer
Custom inspector - disabling specific controls. 1 Answer
Hide the Editor's Toolbar 0 Answers