Search Issue Tracker
Fixed in 2018.1.X
Votes
0
Found in
2018.1.0a1
2018.1.4f1
Issue ID
1049632
Regression
Yes
After Alt+Tab command CursorLockState.Locked stops working
Setting Cursor.lockState to Locked works normally at first, but after alt-tabbing to another window and back to the Unity editor (or player) the mouse becomes unlocked. It remains invisible while in the game window but can move outside of it.
To reproduce:
1. Download attached project "CursorLockBug.zip" and open in Unity
2. Open "SampleScene" scene
3. Enter Play mode
4. Move the mouse and observe that mouse is not visible
5. Alt+Tab to switch to another window
6. Alt+Tab to switch back to the Unity window
7. Move the mouse and observe that mouse becomes visible outside Game window
Notes:
- This issue appears both on Windows and OSX
- Workaround: Setting every frame and enabling "run in background" appears to work around the issue
Reproduced on Unity 2018.1.0a1, 2018.1.6f1, 2018.2.0b9 and 2018.3.0a2
Not reproduced on Unity 2017.4.6f1
Regression on Unity 2018.1.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
- [Linux] "Error while reading movie" errors are thrown when opening templates
- Standalone profiler process is hidden in macOS dock
- Shader warnings are being thrown after building Mixed Reality Template
- Error is thrown when entering play mode with build profiles docked and standalone profiler open
Add comment