Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.1.X, 2020.2.X

Votes

58

Found in

2020.1

2020.2

Issue ID

1275270

Regression

Yes

[window layout] cannot load editor layout, stuck in infinite loop of "failed to load window layout"

Window management

-

steps to repro:
1a. copy the attached "corrupted" LastLayout.dwlt into ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/ (or win/linux equivalent directory)
1b. create a new project via Unity hub

Expected: project is created and opens (and... revert factory settings / load default layout buttons fix the issue and Unity opens)
Actual: project is created but then a dialog appears and user is stuck in infinite loop that can only be stopped by selecting "quit"

repro: 2020.2.0a21, 2020.1.5f1
no repro: 2019.4.6f1

Note:
- found on MacOS
- "Failed to load window layout" window causes user to be caught in an infinite loop since nothing fixes the issue so the window will stay
- 2019.4.6f1 can successfully open with the "corrupted" LastLayout.dwlt but does show console errors

Workaround:
- try moving or deleting the files at
- ~/Library/Preferences/Unity/Editor-5.x/Layouts/default/LastLayout.dwlt (or equivalent path)
- <PROJECT>/Library/CurrentLayout-default.dwlt

  1. Resolution Note (fix version 2021.1):

    You can resolve this issue by upgrading to the appropriate fixed version:
    - 2021.1.0a5
    - 2020.2.0b12
    - 2020.1.14f1

    What has changed?
    - “Failed to load window layout” popup dialog now displays the error that occurred when loading the layout.
    - Choosing “quit” will remove the broken layout from the cache.
    - Choosing “Load default layout” or “revert factory settings” no longer results in an infinite loop with “Failed to load window layout”
- A console error will indicate why Unity failed to load the window layout - this can be cleared.

  2. Resolution Note (fix version 2020.2):

    Tested fixed in 2020.2.0b12

    Unity no longer creates an infinite loop of popup dialogs when attempting to load an invalid or corrupted layout.

  3. Resolution Note (fix version 2020.1):

    Tested fixed in 2020.1.14f1

    Unity no longer creates an infinite loop of popup dialogs when attempting to load an invalid or corrupted layout.

Comments (52)

  1. bea02wil

    Oct 02, 2020 18:25

    this helped me too, but i tired to get this issue

  2. holytoast

    Oct 02, 2020 00:10

    Thx for the solution. Worked for me.

  3. Haroldas_J

    Sep 29, 2020 09:12

    A workaround for this issue:

    1-Go to the root of the Project

    2-Go to Library.

    3-There you find a file named CurrentLayout-default.dwlt open it with
    visual studio.

    4-Now go to UnityHub and open your project.

    5-When the "CANNOT LOAD EDITOR LAYOUT" notification appear click on load
    default

    6-Now go back to visual studio and copy all the code

    7-Then press the "Quit" button

    8-Notice that the code in the visual studio project changed, delete all of
    it.

    9-Finally paste the code that you've copied before and save the project.

    Now go to Unity Hub and try open your project, it should work.

  4. CrAzYpotpie

    Sep 27, 2020 10:15

    Please fix this ASAP. I have only started using Unity in any real capacity again in late 2019, and this issue seems to have popped up for me right around the time I updated to a 2020 version and switched my project to the URP, but I have seen others mention having this issue who were using the default renderer.

    The quickest fix for me is to copy the contents of Default.wlt from Unity's folder in AppData over CurrentLayout-default.wlt in my projects library folder, but this fix only works for the amount of time Unity is open for the first launch. As soon as it closes and re-opens, it begins to fall apart.
    First with NullReferenceExceptions to Unity UI elements, then later the inspector window will start to merge all of its different components over eachother, making modifying anything a major chore of minimizing every component just to see the contents of one, because the inspector is destroyed, can't even scroll in it with the mouse wheel anymore.

    The next time it launches, it will run this infinite loop of being unable to fix itself.

    Windows, Unity 2020.1.5f1.

  5. seejayjames

    Sep 25, 2020 02:11

    Quoting banksysan_unity (the workaround worked for me)
    "Copy one of the layouts from the default list in the editor directory into the Library folder overwriting CurrentLayout-default.dwlt.

    i.e.

    C:\Program Files\Unity\Hub\Editor\<Version>\Editor\Data\Resources\Layouts\2 by 3.wlt => …\Library\CurrentLayout-default.dwlt."

    My path was different:
    C:\Program Files\Unity\Editor\Data\Resources\Layouts\2 by 3.wlt
    You have to rename whatever one you choose to CurrentLayout-default.dwlt, then copy to your Library in your project.

  6. ZoeDreams

    Sep 22, 2020 23:10

    This also affects MacOS Catalina -- 10.15.6 (19G2021) // Unity 2020.1.5f1

    run the following to fix
    ```bash
    cd ~/Library/Preferences/Unity/Editor-5.x/Layouts/default
    mv LastLayout.dwlt LastLayout.dwlt.bak
    cd <project_dir>/Library
    mv CurrentLayout-default.dwlt CurrentLayout-default.dwlt.bak
    ```

    hope that helps :)

  7. Somian

    Sep 22, 2020 17:50

    The workaround with copying over the content of the file after quitting (because the "quit" option apparently corrupts the file") works for me, but the problem keeps coming back, usually after a reboot.

    My solution for now is to have a working CurrentLayout-default.dwlt handy in case it breaks again.

  8. bahaagh7

    Sep 20, 2020 16:26

    Solved!!
    1-Go to the location where your games file is located and click it.
    2-Go to Library.
    3-There you find a file named CurrentLayout-default.dwlt open it with visual studio.
    4-Now go to UnityHub and open your project.
    5-When the "CANNOT LOAD EDITOR LAYOUT" notification appear click on load default
    6-Now go back to visual studio and copy all the code
    7-Then press the "Quit" button
    8-Notice that the code in the visual studio project changed, delete all of it.
    9-Finally paste the code that you've copied before and save the project.
    Now go to Unity Hub and try open your project, it should work.
    Credits to XEZRUNNER.

  9. caladluin

    Sep 20, 2020 14:19

    Had the same thing - after installing 2020.2 beta. It happened on both 2020.1 & 2020.2

  10. wyckster

    Sep 19, 2020 19:06

    IMAKHIIL's solution works for me. Restore factory defaults makes the right change to CurrentLayout-default.dwlt, but clicking Quit reverts the change back to the broken version(weird!). So you have to edit the file after clicking factory default but before clicking quit and copy the contents somewhere (clipboard is fine). Then Quit, then paste the factory default content back into the file and save it.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.