Search Unity

Bug Editor window looses focus when right click menu is visible

Discussion in 'Linux' started by LukaKotar, Oct 14, 2015.

  1. LukaKotar

    LukaKotar

    Joined:
    Sep 25, 2011
    Posts:
    394
    When I open the right click menu in the editor, the editor tab looses focus. This is an issue when trying to find the focused window in editor scripts with custom menu items (specifically inside the 'GameObject/' and 'Assets/' menus).

    If I try to print the value of EditorWindow.focusedWindow by running the function through the right click menu, it returns null.
    However if I use the menu bar (or a hotkey) to run it instead, the window stays in focus, and the correct window is printed to the console.