- Home /
Question by
dtaralla · Apr 06, 2016 at 11:55 AM ·
soundonmouseoverruninbackground
Unity still receives OnMouseOver events while in background
As the title says... My game is a multiplayer game over network and I don't want it to pause whenever the game looses focus (via ALT+TAB or whatever). Therefore I set the runInBackground flag to true. However I noticed that when the window of the game is behing let's say Google Chrome for instance, I still hear the game reacting to the mouseover events (because my buttons trigger a sound when they are hovered). Is it normal? What am I missing here?
Thanks!
Comment
Answer by Dave-Carlile · Apr 06, 2016 at 12:03 PM
You should be able to use OnApplicationFocus to detect when your game is in the background and then ignore input when your app isn't focused.