Search Unity

EditorWindow dock issue

Discussion in 'Immediate Mode GUI (IMGUI)' started by xXApOXx, Oct 18, 2016.

  1. xXApOXx

    xXApOXx

    Joined:
    Feb 9, 2015
    Posts:
    76
    Hi,

    I have trouble with my own EditorWindow, every time I launch Unity while my EditorWindow was dock in the interface, it's been removed from the interface with this both error that I can't figure out :

    Removed empty DockArea while reading window layout: window #3, instanceID=8964
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)
    Removed unparented EditorWindow while reading window layout: window #14, type=UnityEditor.FallbackEditorWindow, instanceID=8986
    UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

    Otherwise my window is working fine.
     
  2. xXApOXx

    xXApOXx

    Joined:
    Feb 9, 2015
    Posts:
    76
    Well I found out. That's because my EditorWindow is in a namespace, that's pretty sad :'(.
     
  3. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,690
    I suspect that isn't the root of the problem. All of my editor windows are in namespaces, and their dock status persists when quitting and launching Unity.
     
  4. xXApOXx

    xXApOXx

    Joined:
    Feb 9, 2015
    Posts:
    76
    Indeed, the problem came back after renaming my window :s
     
  5. xXApOXx

    xXApOXx

    Joined:
    Feb 9, 2015
    Posts:
    76
    Well if I reset the name and add the namespace again, no problem :D. That's so much weird...
     
  6. tsemple

    tsemple

    Joined:
    Jan 21, 2014
    Posts:
    1
    I had this problem and making the class name match the file name solved the problem. And it seems to work with a namespace. If you want to rename the window tab you can use:
    titleContent = new GUIContent("MyTitle");
     
  7. leopripos

    leopripos

    Joined:
    May 25, 2014
    Posts:
    18
    This solved my problem.
    Basically it was happen caused by my window class name not match with my file name.

    And if the error still exist, you can re-open the project to remove the errors caused by the window you created before (when class name not match with file name).