Search Issue Tracker
By Design
Votes
1
Found in
2018.4
2019.4
2020.3
2021.1
2021.2
2021.2.0a16
Issue ID
1338147
Regression
No
Cursor.visible equals True, while the cursor is invisible when entering Game View after unfocusing it
Reproduction steps:
1. Open user's project "Cursor bug report.zip"
2. Open "SampleScene" Scene
3. Enter Play Mode and click anywhere in the Game View
4. Notice how the console is logging out "Cursor visible:False, lockState:Locked" and the cursor is invisible
5. Press Esc to unfocus from the Game View, notice how the cursor is visible and the console is logging out "Cursor visible:True, lockState:Locked"
6. Press anywhere in the Game View again
Expected result: Cursor is invisible and the console logs out "Cursor visible:False, lockState:Locked" when entering Game View again
Actual result: Cursor is invisible while the console logs out "Cursor visible:True, lockState:Locked" when entering Game View again
Reproducible with: 2018.4.35f1, 2019.4.27f1, 2020.3.11f1, 2021.1.9f1, 2021.2.0a18
Reproducible on macOS and Windows
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
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
Resolution Note (2021.2.X):
This behavior is by design. As stated in the Cursor.visible documentation, "Set [Cursor.visible] to true to reveal the cursor. Set it to false to hide the cursor. Note that in CursorLockMode.Locked mode, the cursor is invisible regardless of the value of this property."
The user report requests "a more clear way to identify whether user pressed escape and gameview lost focus", this may be considered as a feature in the future.