How do i keep my game from losing focus

Ok so i am trying to make my game stay in full screen unless u press alt tab or the windows key. It does this but if i move my mouse out of the bounds of the screen to my second monitor is closes how can i force the mouse to be stuck inside to bounds of the main monitor where the game is. If you have any tutorials or anything , it would be appreciated much thxs :slight_smile:

You can lock the cursor. The downside to this is that you then have to handle your own mouse and click events. If you are doing a game like an FPS, then this shouldn’t be a problem.

Info on locking cursor can be found here: Unity - Scripting API: Screen.lockCursor