Search Unity

Editor Layout: Could Not Be Loaded ... EditorWindows Not Available

Discussion in 'Editor & General Support' started by skeptika, Feb 2, 2018.

  1. skeptika

    skeptika

    Joined:
    Dec 31, 2011
    Posts:
    108
    I googled around quite a lot, and this isn't the common Editor Layout: Could Not Be Loaded error others seemed to have had (fixed by resetting/reimporting your project), this only gives you a Log note (not Error (Red) or Warning (Yellow)).

    The full log warning is:
    Code (csharp):
    1. UnityEngine.Debug.Log("The editor layout could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project")
    I have no idea why my custom editor is "not available in this project."
    • It launches just fine, it closes just fine, there are no compile or other errors/warnings/logs. None whatsoever, everything works.
    • I can get the Log message to go away if, after receiving the Log message at Unity startup, I never open the custom editor, then restart Unity, I will no longer get the Log message... until of course I use the custom editor again.
    • I'm not leaving the custom editor open when I close, the error happens regardless of whether you open or close the custom editor before restarting Unity.
    • Interestingly, someone decompiled bits of Unity, so I can even see where the log warning is generated, but I'll be damned if I can understand why, see link here at Line 693: https://github.com/MattRix/UnityDecompiled/blob/master/UnityEditor/UnityEditor/WindowLayout.cs
    • I sort of suspect looking at the decompiled code, that it's not correctly destroying the custom EditorWindow, so I thought maybe I needed to Destroy or DestroyImmediate the custom editor window itself, but doing so causes an actual error that I'm essentially doing it twice (so Unity does seem to be properly deleting the instance of the window). I also tried nulling it out OnDisable, doesn't work.
    I'm fundamentally unsure of how Unity even goes about saving Layouts, and I couldn't find anything in the documentation or by googling. Any help making this Log note go away would be greatly appreciated, I've exhausted my attempted to research and understand how the error comes about!
     
    Last edited: Feb 3, 2018
  2. skeptika

    skeptika

    Joined:
    Dec 31, 2011
    Posts:
    108
    As I'm fond of doing, the answer to my own thread in case any other poor soul comes across this, this is pretty arcane to me, and I kind of feel like Unity should have just red flagged an incorrect instantiation of a class, but ...

    I was doing:
    Code (csharp):
    1. ViewPort viewPort = new ViewPort();
    To create my custom editor's viewport class, where my ViewPort class extends Unity's EditorWindow class. Seemed pretty straightforward to me.

    Unfortunately for me, Unity's EditorWindow class is a ScriptableObject! So it allowed me to use the typical above "new Class()" way you'd normally do to create a new instance of a class, but it REALLY wanted me to use ScriptableObject's form of instantiating like so:
    Code (csharp):
    1. ViewPort viewPort = (ViewPort)ScriptableObject.CreateInstance("ViewPort");
    Derp but hey, only wasted a day, and to be fair, Unity's docs do list EditorWindow class as extending ScriptableObject.
     
  3. Punya1998

    Punya1998

    Joined:
    Feb 4, 2019
    Posts:
    1
    Screenshot (10).png

    Hello
    Please help me in debugging these errors. I am not able to enter into the play mode.
    I dont know how these errors appeared all of a sudden out of no where.
     
  4. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @Punya1998 show the actual errors (red) instead of just the warnings (yellow)
     
  5. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    50
    I've written no code of my own that contains anything 'viewport' , so where is this error coming from ? I'm really enjoying using unity, but it seems its always got SOME error that crops up, unlike another engine I use,that NEVER has this issue to deal with, and being a solo dev atm, its really slowing me down.

    Are there any 'guidelines' I'm unaware of ?
    I already removed/updated , in package manager, any 'preview' packages, is this error a layover from having such packages

    I also have 3dgamekit,its not beta faik, is it too also a suspect in this error ? When unity starts now, I do , everytime, get , in inspector : Explorer : 3d game kit ,,has 3d game kit embedded itself so much into my project that is throwing this error ?

    I abhor any errors of any kind, and I must fix them or I refuse to go forward - call it OCD or whatever you want, but I'm a stickler for working in a 'clean' ENV ;)

    ty
     
    Last edited: Mar 27, 2019
    HandySmurf and theboldedyellow like this.
  6. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    238
    For others encountering a similar situation, my issue was the classic mistake of not having the custom EditorWindow class in a file of the same name.
     
  7. ThePilgrim

    ThePilgrim

    Joined:
    Apr 25, 2013
    Posts:
    17
    Thanks, this solved my issue as well.
     
    mwyatte and Timboc like this.
  8. calebbbarton

    calebbbarton

    Joined:
    Mar 20, 2018
    Posts:
    11
    Thanks, this was my problem as well.
     
    mwyatte and Timboc like this.
  9. SwitchCraft

    SwitchCraft

    Joined:
    Jan 12, 2019
    Posts:
    1
    how do i do this solution
     
    S10Health likes this.
  10. Lucre-Ita

    Lucre-Ita

    Joined:
    Aug 10, 2019
    Posts:
    1
    Bunos Dias!!!! me tira este error y no se donde ni como corregirlo, antes funcionaba de maravillas cuando le aplique el texturizado al terreno, luego no pude compilarlo mas.....

    upload_2019-8-19_11-24-13.png
    upload_2019-8-19_11-27-9.png
    upload_2019-8-19_11-27-30.png
    mi diffuse coloque la imagen original, en normal map (el normal map de la imagen que corresponde) y en el Mask Map la oclusion ambiental (no se si es correcto eso)
    Gracias!!!!!
     
  11. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    Yes! This was bugging us for so long. Thank you!
     
    Timboc likes this.
  12. FutureLing

    FutureLing

    Joined:
    Dec 17, 2019
    Posts:
    1
    Thanks. Here the thing for those who don't get this. In my case, I have changed the path of my standard asset pack so the engine give an error. Now I put the standard asset folder under the default asset folder
     
  13. Batuhan_Kaya

    Batuhan_Kaya

    Joined:
    Apr 3, 2020
    Posts:
    1
    How do i solve it? New to unity, was making a fps game (I have experience with c#), I used nearly the same codes for creating a wall and floor, when i tested creating a floor there was no problem but when I tested creating a wall it gave this error and it is recurring. plz help. sry for bad eng.
     
  14. ozurita

    ozurita

    Joined:
    Apr 23, 2020
    Posts:
    1
    I do not know if this is the same error. I am using a different assets, I have under Assets folder, but also i have others in different folders.
    when I start the game CTRL+P it runs until a black screen or the cursor freezes, and then I can not go back to the Scene editor. I had the message in this post and I am Attaching a file with some crazy names that of course are not the original.

    How can I address this porblem? Just changing all my assets to the folder inside Assets?

    thank you
     

    Attached Files:

  15. cnjoroge925

    cnjoroge925

    Joined:
    May 3, 2020
    Posts:
    1
    Clear the Gi cache the error should be gone
    Go-to edit>>preferences
     
    Siqua, Bilakon, maxthecat and 12 others like this.
  16. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Thanks cnjoroge925!!
     
    parimaljsk likes this.
  17. schcui

    schcui

    Joined:
    Mar 28, 2020
    Posts:
    7
    it helped me a lot , thank you !
     
  18. elyeskacem

    elyeskacem

    Joined:
    Apr 28, 2020
    Posts:
    1
    Maybe you have a buged animation or something like that ?
     
  19. ndrm

    ndrm

    Joined:
    Jul 25, 2020
    Posts:
    8
    what ive learned was, never change any asset location in unity. it cause a lot of problem, not even change instalation folder.
     
  20. ndrm

    ndrm

    Joined:
    Jul 25, 2020
    Posts:
    8
    this happen after unity tells me that standard asset is built for unity 2017, but still i install it to unity 2020. ill listen to unity next time..
     
  21. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    715
    I just started a new project in 2019.4.9f1 and this is error happening and not allowing me to use the editor, there's just black squares where panels used to be.

    This is a completely new project, but I tried clearing the GI cache anyways, nothing...

    The editor just decided to stop working. I have done nothing to cause any changes. Unity just became corrupt...

    I deleted the library folder from the new projects and tried re-opening them, it re-builds the library folder but the error returns and panels are still black, so there's no way to recover and I am totally screwed.

    Now I can't start any new projects with this editor, why is Unity 2019 so unreliable? I mean this is just another bug to add to the pile. However this bug has halted development entirely:


    I can't even open the console to check if other errors are being thrown,

    Rebooted PC, start new project and exact same error, so I can't use the editor at all. What do I do? I can't recover from this.

    ...

    I had to create a completely new user account in Windows just to make unity work again.
     
    Last edited: Oct 15, 2020
    bn-l likes this.
  22. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    This is a long shot... but any chance you had a non-standard setting for the Scale and Layout section (change the size of text, apps, and other items) in the Windows Display Settings?
     
  23. Timitus

    Timitus

    Joined:
    Aug 29, 2017
    Posts:
    1
    Change layout to Default. After that you may rechange to your own layout. I have solved same problem with this way.
     
  24. xxmark71xx

    xxmark71xx

    Joined:
    Dec 5, 2020
    Posts:
    4
    I still had access to my Project Explorer, so I EXPORTED the Project as a package, and imported it into a new Project. Viola! I deleted the 3rd PARTY add on's when I exported the package. So, there was a 3rd party add on that is SUS!

    //ark
     
  25. WARdd

    WARdd

    Joined:
    Aug 10, 2015
    Posts:
    29
    I had a similar problem, I managed to fix it by deleting the UIElements folder from my project Library and the opening the project again. This forces Unity to reload editor layout, hopefully excluding the broken editor window
    upload_2020-12-22_20-10-8.png
     
    muhammet_yurden likes this.
  26. awwadawwad803

    awwadawwad803

    Joined:
    Apr 7, 2017
    Posts:
    2
    Thank you. That solved my problem :)
     
  27. CharlesFSG

    CharlesFSG

    Joined:
    Jan 5, 2021
    Posts:
    5
    How did you know this would fix the issue?
     
  28. TMasri

    TMasri

    Joined:
    Feb 5, 2021
    Posts:
    3
    Sweet Dios Mios! .... that worked!! thanks cnjoroge925!
     
  29. Rublettio

    Rublettio

    Joined:
    Jul 20, 2020
    Posts:
    2
    What does this mean? I'm sorry, I understand each word separately, but
    I also struggled with this for a moment. Basically just make sure that you save your project in the same folder/file as the Engine you're running. Eg. I'm using Unity 2020 so my projects are saved in that same location on your machine. This is what fixed it for me in any case. I hope it might help others.
     
  30. shahriyordeveloping

    shahriyordeveloping

    Joined:
    May 11, 2021
    Posts:
    2
    Close Scene Tab Then Re-Open
     
  31. U_ru_Ru

    U_ru_Ru

    Joined:
    Jan 12, 2022
    Posts:
    2
    lol
    Code (CSharp):
    1. EditorWindows not available in this project
    2. UnityEditor.WindowLayout:LoadDefaultWindowPreferences()
    The resolve is changing editor layout Window=>Layout=>'choose any default layout'
     
    GyeomShin likes this.
  32. LandePlage

    LandePlage

    Joined:
    May 21, 2016
    Posts:
    33
    Nice, this was the reason why I was experiencing this. Thanks!
     
    Timboc likes this.
  33. bn-l

    bn-l

    Joined:
    Aug 27, 2022
    Posts:
    7
    I had this error on a completely new project using the default layout. Switching to another (custom) window layout didn't output the warning, but then switching back to Default outputted it again. I fixed it but clicking "Reset all layouts" under layouts and the warning is no longer being outputted.
     
    Radivarig likes this.
  34. parimaljsk

    parimaljsk

    Joined:
    Mar 6, 2023
    Posts:
    2
    Solved