Search Unity

Feature Request Please allow us change OS cursor state at runtime

Discussion in 'UI Toolkit' started by Hertzole, Jul 3, 2020.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Something that feels incredibly lacking in everything UI related in Unity is the ability to change the cursor depending on certain states. For example, the cursor changing into a little finger when hovering over a button or the caret when hovering over a text box. The editor seemingly supports this as I believe I've seen the option somewhere when debugging elements in the UI debugger. But why not support it at runtime as well?

    I hate to bring in other engines but both Godot and (I think) Unreal Engine supports this out of the box. My UI in Godot felt so much more responsive with the cursor changing when hovering over buttons and the like.

    I know you can change the cursor to another texture but that is not what I want at all. I use the default cursor 99.9% of the time (and I think most other games do too) so why should we provide all these different cursor textures for these states? And when it comes to cross-platform you have to design specific cursors to fit that OS style if you want to keep it consistent. Or maybe the user has a special cursor due to accessibility reasons and I want to keep that. As we've also seen a lot recently, Unity isn't just for games. It can be created to create tools too and having the cursor change state depending on your action could be really useful for a tool developer.
     
    pawelduda, Oneiros90 and WAYNGames like this.
  2. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    377
    Your suggestion makes sense to me. I forwarded you request to our product manager. Can't promise anything but it will definitely be considered. Thanks!
     
  3. Loden_Heathen

    Loden_Heathen

    Joined:
    Sep 1, 2012
    Posts:
    480
    This is defently needed and should be a very low hanging fruit for the Unity dev team.
     
  4. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    I agree as well. It should be implemented the same way as in CSS - cursor: pointer, cursor: default, etc.