Regarding the display and hiding of the cursor when pressing the ESC button

As shown in the picture, I pressed the ESC button and a menu popped up. I pressed the ESC button again, and the menu disappeared, but the cursor remained.

When I press the ESC button, the menu disappears and the cursor also disappears. What should I do?
 

Attachments

  • q1.jpg
    q1.jpg
    373.9 KB · Views: 4
  • q2.jpg
    q2.jpg
    337 KB · Views: 4
This looks like it could be a bug in Unity. When I output the value of cursor.visible it says that it's not visible, even though it really is. I will need to look into this more and possibly create a bug report for Unity.
 
I'm not actively working on it. It'll be some time since it's likely a Unity bug. I will let you know when I take another look.
 
I tested two scenarios using the same script:

Scenario 1: UCC characters were not imported and tested using the simplest scenario (ESC button controls mouse display and hide). The result was normal, and pressing the ESC Key can display and hide the cursor normally. Clicking on the blank part of the UI will not hide the mouse.

Scenario 2: When UCC characters are imported and the mouse is displayed, pressing ESC does not hide the mouse cursor. Moreover, clicking on the blank part of the UI actually hides the mouse cursor!!! So it should be a bug in UCC, I hope this issue can be fixed as soon as possible.

Thank you.
 

Attachments

  • q1.png
    q1.png
    107.5 KB · Views: 7
This is an image of a normal scene and an image of an abnormal scene (the cursor has not disappeared), using the same script.
 

Attachments

  • normal.jpg
    normal.jpg
    249.3 KB · Views: 7
  • abnormal.jpg
    abnormal.jpg
    297 KB · Views: 7
  • q1.png
    q1.png
    107.5 KB · Views: 8
I have made a note. Thank you. I'll let you know after I take a look. I likely won't be able to look at it this month though.
 
As I mentioned, I likely won't be able to look at it this month. I will let you know as soon as I can. I haven't looked at your script but it still likely is a Unity bug based off of when I did look at it earlier. There may be a workaround, but it's going to take some time.
 
Hello, do you mean this issue will not be addressed in March? Is the efficiency of handling this problem too slow? Can we speed it up a bit?
 
Hi @liusha1425 , I took a look at it and in the context of the UCC demo scene, disabling Enable Cursor With Escape on the Unity Input component did the trick for me in build mode.

Screenshot (2272).png

In the editor, the cursor will still be displayed when press Escape a second time to close the pause menu. Unless I am missing something, this seems to be expected behavior within Unity's editor. Anyway lemme know if this helps !
 
Back
Top