Search Issue Tracker
Active
Fixed in 6000.2.0b1
Under Consideration for 2021.3.X, 2022.3.X, 2023.3.X, 6000.1.X
Votes
0
Found in
2021.3.45f1
2022.3.51f1
Issue ID
UUM-85853
Regression
No
Mouse pointer remains visible on-screen when Cursor.lockState is set to CursorLockMode.Locked and Cursor.visible gets set to true in Update
How to reproduce:
1. Open the attached "IN-87477" project
2. Open the "SampleScene"
3. Enter Play mode
4. Click somewhere inside the Game window
5. Observe the cursor visibility
Expected result: The cursor becomes invisible after the Game window gains focus
Actual result: The cursor remains visible even when the Game window gains focus
Reproducible in: 2021.3.45f1, 2022.3.51f1, 2023.3.0b10
Not reproducible in: 6000.0.24f1, 6000.1.0a2
Fixed in: 6000.0.0b11
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Notes:
• The official Unity documentation states that "The cursor is invisible in [Locked] state, regardless of the value of Cursor.visible," which contradicts the observed behavior (See [https://docs.unity3d.com/ScriptReference/Cursor-lockState.html|https://docs.unity3d.com/ScriptReference/Cursor-lockState.html])
• The bug persists in both Editor and built applications
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Resolution Note (fix version 6000.2.0b1):
Fixed Cursor.visible ignoring CursorLockMode.Locked