“Failed to load window layout” the error most of the Unity 3D users faced; even in the updated version of Unity 3D. This error does not let you open your existing project as well as the newly created projects. In this post, we’ll see how to fix the “Failed to load window layout” in Unity 3D.
Why Failed to load window layout error window showing in Unity 3D
In Unity 3D “Failed to load window layout” error is showing when there are any errors in your Editor script. “This happens if layout contains custom windows and there are compile errors in the project”. This is what mentioned in the error window.
Sometimes, the same error window is displayed even if you create and opening a new unity project. When you have a custom editor window in your project and it doesn’t compile successfully; Unity 3D is not able to load your window and the project.
How to fix Failed to load window layout error in Unity 3D
To fix the “Failed to load window layout” error in Unity 3D you can use the options provided in the error window. There will be three options to proceed further.
The first one is “Load Default Layout” – when you’re using this option, the Unity project window is set to the default layout. And it will remove your custom window and use Unity’s default layout types.
The second one is “Revert Factory Settings” – this will remove all the custom layout window preferences in Unity 3D and load the default layout for the editor.
The below window will be shown when you select this second option, click the continue button when it asks for confirmation for resetting the layouts.
The last one is “Quit” – it will quit the process of opening the Unity 3D project and close the project without any changes in it.
The other option is if you have the custom window script in your project open the script in Visual Studio and fix any error in the script. If your project doesn’t have any custom window and you’re facing this error, please try the above options to fix them.
[irp]
Alternative way to fix the error in Unity 3D
If you tried all the above and the same error window is showing or getting the error even for a new project then try the following option to fix. It will replace the project layout support file with the default layout file.
1. Open Users/<currentUser>/AppData/Roaming/Unity/Editor-5.x/Preferences/Layouts/default
2. Open Default.wlt fine using any text editor
3. Copy the content from the Default.wlt file
4. Go to your project folder and find the folder named Library
5. Now open the CurrentLayout-default.dwlt file in any text editor
6. Paste the copied content and save the file and try to open the project
Please close all the instances of Unity before doing the changes. The above solution will work perfectly without any issue and you’re able to open your project successfully.
To avoid the issue in future projects please check that Unity 3D has the write permission in the installation directory. Maybe sometimes this causes the error.
Thanks for the read please share your feedback in the comments.