Search Issue Tracker
By Design
Votes
1
Found in
6000.0.58f1
6000.2.5f1
6000.3.0b2
Issue ID
UUM-117790
Regression
No
Cursor image does not update when Cursor.SetCursor is called again with CursorMode.Auto
How to reproduce:
1. Open the “IN-113198_hardwareMouseBug“ project
2. Open the “ArtScene/InGameGuiScene”
3. Enter Play mode
4. Move the cursor in Game view until “set second” log appears in the Console
5. Observe the cursor
Expected result: Cursor text displays “Second”
Actual result: Cursor text displays “First”
Reproducible with: 2023.3.0a2, 6000.0.58f1, 6000.2.5f1, 6000.3.0b2
Could not test with: 2023.3.0a1 (Compilation errors due to packages)
Reproducible on: macOS 15.6.1 (M1 Max), Windows 11 (by user)
Not reproducible on: no other environments tested
Notes:
- If using “CursorMode.ForceSoftware” the issue does not reproduce
- If “CursorMode.ForceSoftware” was used at least once and script was switched back to “CursorMode.Auto” the issue does not reproduce for the entire Editor session (until Editor is restarted)
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
- LocalizationSettings.InitializationOperation hangs when re-entering Play Mode with Domain Reload disabled
- [UI Toolkit] Delete key deletes the incorrect character and allows for an extra character deletion when language direction is set to RTL
- Dropdown property is cut off and adds unnecessary side padding when a Sub Graph is used as a node in Shader Graph
- All text in the Project Settings Window is still Tinted White after deleting Text in the Search Window
- "WebGL Template" icons disappear when building the project with the Project Settings opened
Resolution Note:
The cursor change is not applied the second time because of caching that aims at improving performance by not rebuilding the internal cursor structures when having been passed the same texture again. While it would theoretically be possible to add another variant of SetCursor that accepts a new parameter to override cache, it is a bit out of scope at the moment. As a workaround, we could suggest using multiple Texture instances, or try changing the name of the texture every time you modify it, as that affects indexing in cache too. Hope that helps. Anthony.