- Home /
Question by
LightStriker · Sep 27, 2013 at 02:23 PM ·
editorwindowfocusshow
EditorWindow.ShowPopup is not focused
This is very annoying... On a custom EditorWindow, I need to popup some option for the user to choose from. Right now, when I do ShowPopup, the new window is not focused by default (focus is retained by the original window). The user has to click on it for the GUI's controls to work. (Ex.: Press Escape or Enter)
On top, if I try "Focus()" on it, it spit some error that "WindowLayouts are invalid."
Also, ShowAsDropDown() crashes.
Comment
Did you ever get this working? I can't seem to find a workaround using Unity 3.5.7 or 4.0. It works in 4.2, but I need to keep the code compatible with older versions of unity...
I managed to make it work with ShowAsDropDown. However, I could not claim if it works on <4.2 as we don't use any version under that.
Your answer
![](https://koobas.hobune.stream/wayback/20220613114915im_/https://answers.unity.com/themes/thub/images/avi.jpg)