Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
26
Question by AtticusMarkane · Mar 29, 2020 at 08:23 PM · editoreditorwindowcustom editorwindows 10

Stuck in "Failed to load window layout" loop

When working on a custom editor window in Unity 2020 I caused the editor to crash. Upon trying to re-open it I received a "Failed to load window layout" dialog with the option to load the default layout or to reset to factory. Neither of these solutions would fix the issue and my only recourse was to cancel opening the editor. Does anyone know how to get Unity back up and running?


Failed to load window layout loop


Things I have tried:


  • Deleting the Library and other generated project files

  • Creating a new project (Results in the same error)

  • Uninstalling and re-installing Unity

  • Deleting AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default\LastLayout.dwlt


Editor.log

 Failed to load window layout: System.NullReferenceException: Object reference not set to an instance of an object
   at UnityEditor.ContainerWindow.GetWindowID () [0x00070] in <a820952c8bdb44eba9c4c39808ab1e8a>:0 
   at UnityEditor.ContainerWindow.get_windowID () [0x00010] in <a820952c8bdb44eba9c4c39808ab1e8a>:0 
   at UnityEditor.ContainerWindow.SaveGeometry () [0x00001] in <a820952c8bdb44eba9c4c39808ab1e8a>:0 
   at UnityEditor.ContainerWindow.Save () [0x0000d] in <a820952c8bdb44eba9c4c39808ab1e8a>:0 
   at UnityEditor.ContainerWindow.Close () [0x00001] in <a820952c8bdb44eba9c4c39808ab1e8a>:0 
   at UnityEditor.WindowLayout.LoadWindowLayout (System.String path, System.Boolean newProjectLayoutWasCreated, System.Boolean setLastLoadedLayoutName, System.Boolean keepMainWindow) [0x000b7] in <a820952c8bdb44eba9c4c39808ab1e8a>:0


unitylayoutbusted.gif (516.4 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kaweri · Nov 28, 2020 at 11:39 AM 0
Share

solution : it works 100% : https://www.youtube.com/watch?v=hGukVu1DR18

22 Replies

· Add your reply
  • Sort: 
avatar image
68
Best Answer

Answer by AtticusMarkane · Mar 29, 2020 at 08:40 PM

Managed to solve the issue with help from a colleague at Unity who pointed me to the public source code for this part of the editor.


I was on the right track. The issue was caused by the editor trying to reload my custom editor window but being unable to for whatever reason (probably broken tbh). Deleting LastLayout.dwlt in the Roaming folder should have resulted in the editor falling back to the default layout, however what I did not realize was that there is an equivalent CurrentLayout file in the Library for the project. Deleting both the LastLayout.dwlt and the Library/ before attempting to re-open the editor cleared up the issue.


While I am here I want to point out that all of the solutions that I previously tried are valid solutions for different occurrences of this error; They were provided and tested by other users and provided as valid answers in other questions. If my answer does not solve your problem, consider trying one of those.

Comment
Add comment · Show 13 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image flashframe · Sep 03, 2020 at 03:30 PM 0
Share

Thank you so much for following up with your solution. Had the exact same problem, and deleting the CurrentLayout did the trick.

avatar image binoman · Sep 17, 2020 at 01:42 PM 1
Share

Thank you very much. It was the only thing that works. One annoying thing though, I need to do this every time I create a new project. Is there a permanent solution?

avatar image AtticusMarkane binoman · Sep 17, 2020 at 02:31 PM 1
Share

I have not had this problem and my guess would be that you have something in your custom editor UI that is repeatedly putting you into this state. I recommend disabling all of your custom editor UI and then enable them one at a time. This will be tedious, but it should help you pinpoint if one is breaking the layout. Good luck!

avatar image binoman AtticusMarkane · Sep 20, 2020 at 04:23 AM 3
Share

I have no custom ui at all

avatar image Ratherjolly · Oct 03, 2020 at 02:28 AM 0
Share

Oh man. Thank you so much. I got this error starting Unity 2020.1.6f1 for the first time. Not to mention I started it up for the purpose of Doing the Ludum Dare Game Jam. Seriously, man. You saved my butt.

avatar image sophiepbh · Oct 06, 2020 at 10:13 AM 1
Share

Where is the CurrentLayout file? I have no clue as to where it is. I am new to unity and i was going to create a new project but it won't open when i press create or try to open otherwise

avatar image AtticusMarkane sophiepbh · Oct 07, 2020 at 12:30 PM 3
Share

Its deeper in this directory: C:/Users/YourUserName/AppData/Roa$$anonymous$$g/Unity/

avatar image jaysonhanlon8 AtticusMarkane · Oct 09, 2020 at 08:57 PM 0
Share

hi, sorry could you totally walk me through how to do this.. I am lost sorry

Show more comments
avatar image NKBDL · Oct 14, 2020 at 03:59 AM 0
Share

YES this solution does it. It happens that I started to get 2 windows on launch. One being black and if I close it it closes the project one and for all. Then the loop began... Prior to that I started using some custom package (that recorder one)

Anyways, removing the last layout from both the AppData and the your project folder works.

Now back to Unity. Thank you thank you!

Show more comments
avatar image
26

Answer by zaxvax · Oct 01, 2020 at 12:37 PM

@metinevren Copying \Library\CurrentLayout-default.dwlt form any working project to problematic project works like a charm.

Comment
Add comment · Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image lqvinh2 · Oct 14, 2020 at 07:32 AM 0
Share

this OK, THANK YOU, work in unity 2020.1

avatar image Sanjay1987 · Oct 21, 2020 at 01:52 PM 0
Share

Yes this got my project working.!!! Was stuck and annoyed but finallyy!!!!

avatar image mcroswell · Nov 07, 2020 at 05:32 AM 0
Share

Only this solution worked for me. v2020.1.6f1

avatar image RobotGame · Nov 19, 2020 at 11:02 AM 0
Share

Awesome this fixed it for me in unity 2020.1.12f1

avatar image ahmedaniss · Dec 01, 2020 at 08:13 PM 0
Share

problem fixed here : https://youtu.be/Av9zt1gcpqc

Show more comments
avatar image
4

Answer by ahmedaniss · Oct 10, 2020 at 12:20 PM

problem fixed here : https://youtu.be/Av9zt1gcpqc

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image StuckProblem · Oct 22, 2020 at 02:55 PM 0
Share

Does it fix it permanently though? I have this problem with every new project just like someone else in the solution comments.

avatar image RoyBarina · Oct 28, 2020 at 01:56 PM 0
Share

It's not a fix it's a workaround. nothing on this page is a fix they are all workarounds.. to fix this damn issue one must change the algorithm and the code.

avatar image StudioZooka · Nov 25, 2020 at 04:25 AM 0
Share

Worked for me!, thank you for sharing!

avatar image
2

Answer by metinevren · Sep 19, 2020 at 04:26 AM

It did not work. I cannot open a newly created project!! So ther ecannot be custom windows!

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image binoman · Sep 20, 2020 at 04:26 AM 0
Share

Try deleting the stuff @matticus99 suggested after everytime you create a project

avatar image AtticusMarkane · Sep 23, 2020 at 05:10 PM 0
Share

These settings are shared across projects iirc. I one project left it in a broken state, then a new project would not change it.

avatar image binoman AtticusMarkane · Oct 06, 2020 at 12:22 PM 0
Share

Not exactly. There is a last layout file saved in the Library folder of the project. With this file, you would open the same layout on every computer you'd use. And there are layout files in the appdata, which are cross project and used to create new projects.

avatar image biskitdev · Oct 02, 2020 at 08:40 AM 0
Share

this also happens to me

avatar image metinevren · Oct 02, 2020 at 04:05 PM 0
Share

After clicking "load default layout", go to the folder, make a copy of the LastLayout.dwlt. Because if you don't, Unity corrupts the file again.

avatar image JeffreyStrate · Nov 03, 2020 at 10:52 AM 0
Share

Du must erst alle Layout löschen dann kommen neue.. .- aber lösche mit Unity oben in Delete Layouts...

Show more comments
avatar image
1

Answer by Kriztoff · Oct 07, 2020 at 09:44 AM

I found the location: Reddit

,For the people having trouble with the location of the file, i found the solution on: Reddit

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • 3
  • 4
  • 5
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

216 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

EditorWindow: How to Serialize variables after PLay 1 Answer

Custom brush tool? 0 Answers

Change Image/Icon Shown for Asset in Project/Asset Window? 0 Answers

Edit an object in isolation quickly, as in the new Prefab Mode 0 Answers

mouseposition and clicks in editor sceneview 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges