This is quite a bit old, but nonetheless, My issue was the mouse wouldn't lock after minimizing the engine, and coming back to it, while it was in play mode.
I found the answer to why it was happening to me, [Here][1]
Basically what was going on was, I didn't have the option: "**Run in background**" enabled in the player settings.
This may also help others that are running into this as well; or at least can check it off the list of possible fixes.
[1]: https://answers.unity.com/questions/1512578/cursor-lock-not-working-after-alt-tab.html
↧