Invalid Editor Window

Hey guys, i get this error:
Invalid editor window UnityEditor.FallbackEditorWindow

…but i don’t know where it come from and yes, I have a custom EditorWindow.
But I get this error when in run-time. If i click this error it just opens the Mono IDE but i doesn’t show me the line or the scirpt where the error comes.

Sorry for my bad English… Greek here! :stuck_out_tongue:

Thanks in advance
Mike

1 Like

could you please describe the problem a bit more detailed?

Or attach some screenshots?

Maybe you could send me your project files so I can have a look at it.

Which unity version are you using?

Shigeru

3.4 Ver.

I just run the game from the editor and i get that error. I have an EditorWindow that i have made but i don’t get that error while not running the game. I don’t think you need screenshots coz it doesn’t do anything in the game. it doesn’t crash, just shows that error message.

Did you tried using an empty project?

How did you made that editorwindow?

Shigeru

1 Like

public class ControlWindow : EditorWindow {
Vector2 texturePosition = new Vector2(0,0);

[MenuItem (“Window/Control System”)]
static void ShowWindow(){
EditorWindow.GetWindow(typeof(ControlWindow), false, “Texture Controller”);
}

void OnGUI(){
texturePosition = EditorGUILayout.Vector2Field( “Position:”, texturePosition );

if ( GUILayout.Button( “Show Position” ) )
Debug.Log(texturePosition);
}
}

This is a small piece of code. The thing is that it works FINE with NO ERRORS! But in runtime instead of the closed editorwindow, it shows that error. :-/

You must put all editor scripts inside Assets/Editor folder. If it doesn’t exist, create one and put your script inside there.

I get the same error. Pretty annoying. Shouldn’t it be possible to put Editor folders wherever you want inside subfolders of the Assets folder?

~ce

it used to be possible but I am not sure it still holds actually as per 3.4
During unity 3 a lot of that stuff changed and with 3.4 quite a bit also in form of the solutions so check in which project it ends, that says it all

Yes, you should be able to put Editor folders anywhere in the Assets folder (with the exception of Resources folder maybe). If this isn’t the case it’s a bug so please submit a bug report with an example.

Just in case if the problem still persists ,reset the window factory settings inside the Unity editor which is available in the right top corner where you set your layout.

Here is a screenshot
871683--32553--$Screen Shot 2012-03-23 at 10.21.33 PM.png

The solution worked for me, hope it does for everyone else.
Do not forget to reply to this post as a solution to this thread if it solved your problem so that others may also get to know.

17 Likes

Thanks ravinder, I had the following error and your solution cleared up the problem:

Invalid editor window UnityEditor.FallbackEditorWindow UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

The error message would appear when I maximized any editor window and then minimized again. I thought it was in my code so after hours of searching I was happy to find your answer.

Cool Ravinder. It worked for me…

Good call Ravinder. Your suggestion worked for me. :slight_smile:

This happened after I imported the Stealth Package.

Reverting to factory setting also helped fixing this! Thx

From what I understand…

This happens when you have an editor window referenced by the editor that doesn’t know how to behave, example using custom editor windows and closing unity, then reopen without the code compiled, perhaps you deleted the asset you were now finished with; or using a different layout that cant be reproduced when Unity is reopened because some reference is missing.

It happened to me in 5.3.

According to this stackoverflow post c# - EditorWindow.GetWindow doesn't work - Stack Overflow EditorWindow.GetWindow() also affected by this, but you simply need to reset Layout to any predefined preset.
Annoying bug.

Reverting to factory setting is best way to remove this error…

Thanks man … works here

Cool Ravinder, worked like a charm. Thanks man.

, VERY old obviously, but clearly its like PICK one :wink:
Resetting factory did no good, as going to ‘wide’,which I prefer, and the problem comes back.

Why is this such a hard lift,such an easy thing and no official response seems ridiculous, given errors like this should be a thing of the past, never see them in UE4 where I have another project.
So what is the real fix ?

Also during the process my terrain and everything else magically disappears from viewport ( replaced by gizmos ) though are all there in hierarchy.

Talk about BUGGY software.
Is anyone else seeing this in 2019.2.14f1 ?

2 Likes