Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Invalid Editor Window

Discussion in 'Editor & General Support' started by nekroadmin, Sep 9, 2011.

  1. nekroadmin

    nekroadmin

    Joined:
    Apr 22, 2011
    Posts:
    22
    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! :p

    Thanks in advance
    Mike
     
    Last edited: Sep 9, 2011
  2. Shigeru

    Shigeru

    Joined:
    Sep 7, 2011
    Posts:
    32
    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. nekroadmin

    nekroadmin

    Joined:
    Apr 22, 2011
    Posts:
    22
    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.
     
  4. Shigeru

    Shigeru

    Joined:
    Sep 7, 2011
    Posts:
    32
    Did you tried using an empty project?

    How did you made that editorwindow?

    Shigeru
     
    last4ng likes this.
  5. nekroadmin

    nekroadmin

    Joined:
    Apr 22, 2011
    Posts:
    22
    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. :-/
     
  6. tutibueno

    tutibueno

    Joined:
    Dec 11, 2009
    Posts:
    9
    You must put all editor scripts inside Assets/Editor folder. If it doesn't exist, create one and put your script inside there.
     
  7. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    858
    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
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    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
     
  9. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    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.
     
  10. ravinder

    ravinder

    Joined:
    Aug 25, 2010
    Posts:
    150
    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
    $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.
     
  11. Innovative

    Innovative

    Joined:
    Jan 13, 2013
    Posts:
    4
    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.
     
  12. Pratap-Dafedar

    Pratap-Dafedar

    Joined:
    Aug 30, 2013
    Posts:
    22
    Cool Ravinder. It worked for me...
     
  13. Spelmyst

    Spelmyst

    Joined:
    Dec 10, 2011
    Posts:
    7
    Good call Ravinder. Your suggestion worked for me. :)

    This happened after I imported the Stealth Package.
     
  14. Rainking

    Rainking

    Joined:
    Jun 10, 2013
    Posts:
    41
    Reverting to factory setting also helped fixing this! Thx
     
  15. Stephen_O

    Stephen_O

    Joined:
    Jun 8, 2013
    Posts:
    1,510
    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.
     
  16. Skyblade

    Skyblade

    Joined:
    Nov 19, 2013
    Posts:
    77
    According to this stackoverflow post http://stackoverflow.com/a/23313182 EditorWindow.GetWindow() also affected by this, but you simply need to reset Layout to any predefined preset.
    Annoying bug.
     
  17. arfan447

    arfan447

    Joined:
    Oct 26, 2015
    Posts:
    7
    Reverting to factory setting is best way to remove this error.....
     
  18. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    Thanks man ... works here
     
  19. JoltBug

    JoltBug

    Joined:
    Jul 11, 2016
    Posts:
    8
    Cool Ravinder, worked like a charm. Thanks man.
     
  20. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    249
    , VERY old obviously, but clearly its like PICK one ;)
    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 ?
     
    Last edited: Nov 30, 2019
    s4relok and akareactor like this.
  21. ImperialDynamics

    ImperialDynamics

    Joined:
    Jun 21, 2018
    Posts:
    21
    i have this issue when i try to go full screen on my ultrawide monitor. Unity are you paying attention? This issue is all the way from 2015 !
     
  22. Maister

    Maister

    Joined:
    May 29, 2016
    Posts:
    3
    I had just the same problem with unity 2019.3.3f1. I also have a script which is executing in Edit mode.. so maybe that is a potential source for this bug. Layout reset also worked for me.
    @junctionboss my terrain also disappeared, but selecting it in the hierarchy and pressing "F"-key while cursor is in viewport, zoomed in on it again… because it actually did not really disappear, but zoomed way out actually. Also I can to "Wide" layout without a problem now..
     
  23. kaila2000

    kaila2000

    Joined:
    Apr 29, 2020
    Posts:
    2
    that bug happened even i used default layout. (using 2019.4.7f1)
    why unity don't fix it?
     
  24. techlk

    techlk

    Joined:
    Aug 31, 2020
    Posts:
    2
    The Solution is ,
    Windows> layout> Default
     
    mcaleerkj and stefan-velnita like this.
  25. ahmedaniss

    ahmedaniss

    Joined:
    Sep 18, 2019
    Posts:
    98
    problem fixed here :
     
  26. DragonSix

    DragonSix

    Joined:
    Jul 2, 2013
    Posts:
    37
    Doesn't work. As soon as you close and restart unity, the error comes back.

    Here's the repro steps :
    -Delete both appdata/Local/Unity and appdata/Roaming/Unity folders and reinstall Unity 2019.4.13f1.
    -Create a new project.
    -Activate Maximize on the game window and play test: it works.
    -Close Unity
    -Re-open Unity
    -Press play.
    -Error.

    Doesn't take a genius to figure maximized playtest is busted.

    You can set layout default or factory reset as much as you want, it wont change the fact that next time you restart unity with maximized playtest, it will error out.
     
    Eater_Games likes this.
  27. wlwl2

    wlwl2

    Joined:
    Jun 17, 2018
    Posts:
    29
    For me, I can get rid of the issue by selecting any saved layout manually every time I start the editor. Revert Factory Settings... does nothing. I don't like this fix though even though I have to manually set it only once.
     
  28. douglima

    douglima

    Joined:
    Apr 26, 2017
    Posts:
    10
    having the same issue here

    Unity 2019.4.13f1

    Even after factory reset, every time I enter play mode the error appears
     
    s4relok, Nothke and Eater_Games like this.
  29. wlwl2

    wlwl2

    Joined:
    Jun 17, 2018
    Posts:
    29
    @Liderangel filed a bug report on this recently. You can vote for it at: Issue ID: 1287233. If the link doesn't work, search with "Scene/Game View" category and "2019.4" version.
     
    Last edited: Oct 30, 2020
    Eater_Games likes this.
  30. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,294
    This is annoying. I just upgraded from 2019.4.1 to 2019.4.14. My experience says, that number after last dot is "patch" version and does not introduce breaking changes. Meanwhile in my project cloth stopped working like it did before or such bugs show up. I totaly understand this is game engine and it can be easy to break something by fixing other problem, but this bug literally appears upon entering playmode... meh.
     
  31. k08058804

    k08058804

    Joined:
    Oct 16, 2019
    Posts:
    1
    same to you
     
  32. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    773
    Most solutions posted say to just reset the layout to factory settings. This is useless if you're using a custom layout because you HATE the factory one. Another solution is to save a custom layout and revert back to it when the error occurs. This doesn't address the fact that Unity forgets which layout you're using periodically - either because you moved a window border, opened a 3rd party editor window, or did any number of other ROUTINE things in the editor while working on your game. As far as I can tell, this error doesn't indicate a real problem of any kind. It won't prevent you from running or compiling your game. Its only purpose seems to be to annoy and distract you from much more important things. Why does it even exist? Why does Unity even test for this if it has no actual consequences? It seems like the best solution is for whoever added this "test" to the code-base to just admit it serves no purpose and remove it. :rolleyes:
     
  33. _Prism_

    _Prism_

    Joined:
    Jan 25, 2014
    Posts:
    11
    Just to echo what's already been suggested; restoring a layout (in my case a custom layout) seemed to fix it for me