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
- Particle System "Start Rotation" property affects a different axis when upgrading to newer Editor versions
- "Light" Component's "Culling Mask" setting is hidden but still has an effect when using HDRP
- Selecting the Web platform can be done when using the HDRP project
- Textures swap when SpriteRenderers with shared materials and animators are toggled on and off
- "EndLayoutGroup: BeginLayoutGroup must be called first" is thrown when selecting the wrong executable for the browser and then the right one
Add comment