Search Unity

Feedback Unity 2021: Mouse cursor always visible when entering play mode until clicking Game View

Discussion in 'Editor & General Support' started by dgoyette, Sep 19, 2022.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,195
    I used Unity 2019 for a while before updating to 2021. So far the biggest annoyance has been that when entering Play Mode, the mouse cursor will still be visible on the screen. This is the case no matter how much you try to set Cursor.visible or Cursor.lockState. The only way to get the mouse cursor to behave properly after entering Play Mode is to physically click within the Game view.

    I'd be very happy if someone could tell me a way to avoid this, but at this time it's deeply frustrating. Here are common things that happen to me these days the first time I click after entering Play Mode:
    • I click on the Play button again, and leave Play Mode
    • I click on the "X" at the top right, and close Unity
    • I click on the Maximize Game view window, and it changes size
    Basically, any time I enter Play Mode, there's essentially a rogue mouse cursor on the screen, which can potentially click on any part of the Unity editor window, when I intend to click within my game. These days, every single time I enter play mode, I need to first remember to move the mouse into the Game view, and click.

    Anyone know a workaround? Or can this just get fixed?