Search Unity

Unity window focus detection

Discussion in 'Scripting' started by touming, Sep 23, 2008.

  1. touming

    touming

    Joined:
    Apr 19, 2008
    Posts:
    14
    How can I know if my running Unity Window is inside the current focus or not (due to overlapping windows, ect) ?

    I just want to stop mouse and keyboard to affect the game, if the window is out of focus...
    So basically it's kind of the functionality of Application.runInBackground = false, but without pausing the game.

    ...is there some way to solve this problem?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    It would almost certainly be in the Application class if it existed, so I don't think it does. Would certainly be a useful feature, I would Wishlist it.