Search Unity

Cursor behaviour in fullscreen app

Discussion in 'Windows' started by Peecha, Dec 6, 2019.

  1. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    23
    Hello,

    i am making Windows store version of our game and i stumbled upon a problem.
    Since WSA doesn't support Cursor.lockState Confined, how am i suppose to handle this situation:

    Cursor.visible is set to false and i am using animated cursor which follows Input.mousePosition.
    When i build D3D project and try it on local machine (Master build) i am able to move cursor to the edges of the screen and it reacts with the windows functions (like the bottom right corner which shows the desktop) and the game looses the input.
    The game is in fullscreen mode, so why is the cursor moving outside the game view?
    Or is this happening only when debugging it locally?

    Cursor.lockState Locked seems to be overkill, because that would require additional logic for handling the interactions with UI elements.

    Am I missing something trivial here?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
  3. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    23
    Thanks, i did use the Minimal mode, which is better. Luckily i have fps controller movement and ui interactions not overlapping, so i ended using combination of locking/unlocking the cursor at appropriate moments :)