Inheriting from Inherited EditorWindow causes 'Failed to Load' error

Hi Guys,

So if my code looks like this:

public class A : EditorWindow
{
}

public class B : A
{
    [MenuItem("Windows/B")]
    static void Init()
    {
        EditorWindow.GetWindow<B>().Show();
    }
}

And I add window B to the editor. If I restart Unity, the B window will always fail to load. It seems that Unity doesn’t handle multiple inheritance from Editor Window correctly when Unity has to load, window A however will always load correctly.

Is this bug known? Or am I missing something major?

bump

I added inheritance to one of my editor windows to see if I could reproduce your error. Everything worked fine.

One of the common causes of the “Failed to load” error is that the name of the class does not match the name of the source file. You might want to verify that each of your classes is located in its own source file and that the file names are correct, including capitalization.