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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
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.