- Home /
How do I fix "Failed to load window layout"
I have just installed the latest version of Unity on my macbook pro. When I launch the application, a notification come up saying it failed to load the window layout. I have tried the options it provides, reinstalling unity, and holding alt when opening to start a new project. All yield the same result.
At present I have this issue and I have tried all the solutions but neither one worked for me.
Please give some other suggestion for this.
@siddharth3322:
If you're on windows, try simply deleting the last layout. Just go to this folder:
%AppData%\Unity\Editor-5.x\Preferences\Layouts\
// this usually brings you to a folder that looks something like:
C:\Users\YOURUSERNA$$anonymous$$E\AppData\Roa$$anonymous$$g\Unity\Editor-5.x\Preferences\Layouts\
In that folder you'll find a file called "LastLayout.dwlt". Just delete this file (you might want to create a backup if you want but since the layout is corrupted it most likely can't be recovered).
If this doesn't fix your issue, there's something else wrong on your PC. $$anonymous$$aybe a permission problem.
Answer by turbolek · Sep 16, 2020 at 02:05 PM
I just had the same issue on a new Unity Project, on a fresh Unity 2020.1.4f1 install, on a fresh Windows install. I fixed it by
going to AppData/Roaming/Unity/Editor-5.x/Preferences/Layouts.default
opening Default.WLT file in Notepad
going to MyProject/Library
opening CurrentLayout-default.DWLT file in Notepad
pasting the copied text and saving the file
I don't know why it worked though, just sharing what I discovered after a day-long research.
I tried so many things before that one haha. Thank you man, you saved me !
This worked for me as well. It's working because the editor is having errors with the window layout settings and is unable to reset them at launch (or to load the last layout) and this is manually setting the layout back to the defaults from the wlt files.
I seem to have to do this every time I boot Unity after having windows besides the default windows open, they really, really, need to fix this it is extremely irritating.
Thank you my friend. It happened the first time with Unity.2020.n
Also the new version 2020.1.7f1 has the error.
Answer by lulitha · Sep 11, 2020 at 04:40 PM
Resolved IT Create a new Project go to the file location and copy 'project'/Library/CurrentLayout-default.dwlt Paste this file into your original projects ...librarry/... path It worked for me.
Thanks a lot! It also helped to just take it from a working project.
Answer by ReaperMMA · Feb 25, 2015 at 05:33 AM
ANSWER 1. launch Unity. 2. relaunch unity (without closing your first failed message). 3. it will allow you to open a new or existing project. 4. fix your previous project somehow.**
your welcome :)
I get the failed to load issue. It is because I edit the unity static variable like
GUI.skin.button.normal.background;
which is not a good practice. In my case, I want to do such changing the button state style after the user pressed it. So the better way is preparing temporary variable which could hold the same type of the value above. For example,
public class SettingsWindow : EditorWindow {
Texture2D buttonBgN;
Texture2D buttonBgA;
public GUIStyle $$anonymous$$enuItemStyle;
void Awake(){
$$anonymous$$enuItemStyle = new GUIStyle(GUI.skin.button);
$$anonymous$$enuItemStyle.normal.textColor = new Color(1,0,0);
$$anonymous$$enuItemStyle.hover.textColor = Color.cyan;
buttonBgN = GUI.skin.button.normal.background;
buttonBgA = GUI.skin.button.active.background;
$$anonymous$$enuItemStyle.normal.background = buttonBgA;
}
void OnGUI(){
if(!pressedbool){
if(GUILayout.Button("Change to A", $$anonymous$$enuItemStyle)){
pressedbool = true;
$$anonymous$$enuItemStyle.normal.background = buttonBgA;
}
}else{
if(GUILayout.Button("Change to N", $$anonymous$$enuItemStyle)){
pressedbool = false;
$$anonymous$$enuItemStyle.normal.background = buttonBgN;
}
}
}
public void pressed(){
GUILayout.BeginHorizontal();
GUILayout.Label("You have pressed the first button, press the second button and this will dissapear");
GUILayout.EndHorizontal();
}
}
Hope this help someone.
Answer by Johannski · Jun 14, 2018 at 08:48 AM
If you're on Mac10.13 (High Sierra) and you're using an old unity version (5.4 or lower) the problem occurs as well. Sadly you can't do much about it. More on that here: https://forum.unity.com/threads/unity-and-macos-10-13-high-sierra.474527/
You're right. $$anonymous$$y problem is solved. Thank you
Answer by russtman · Dec 18, 2014 at 01:07 AM
Hi, I had exactly this problem and it was because Unity did not have write permissions in the home directory where it was installed.
Fixed with command line (assume user foouser and you have sudo privileges):
$ sudo /bin/bash
# cd ~foouser
# chown -R foouser .
Your answer
