Search Unity

any way to bring application window into foreground/focus?

Discussion in 'Scripting' started by Stephen-Lavelle, Jan 24, 2016.

  1. Stephen-Lavelle

    Stephen-Lavelle

    Joined:
    Apr 17, 2013
    Posts:
    41
    I've encountered a spooky bug when launching my game from steam that doesn't happen when it's launched from standalone

    1 : if launched in windowed mode, it's launched in the background
    2 : it's launched fullscreen, it comes into the foreground, but i have to click to focus it.

    Is there any way in unity to force the application window to go into the foreground and grab focus? (Say to call it once at launch). This isn't really a unity bug, but it's more likely I find a unity workaround than valve fix anything :p

    (this only happens for me on osx)
     
  2. Stephen-Lavelle

    Stephen-Lavelle

    Joined:
    Apr 17, 2013
    Posts:
    41