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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment