Search Unity

Question Having buttons reacting to mouse on new input system.

Discussion in 'Input System' started by pineapuru, Jun 21, 2021.

  1. pineapuru

    pineapuru

    Joined:
    Mar 21, 2018
    Posts:
    46
    There are probably other posts talking about this, but I couldn't find exactly what I was wishing for.

    I'm trying to make buttons on my game UI work just like they did on the old unity input system but on the new.

    I don't quite understand how to set their values should I set up on the input manager and how to make them work over the buttons.

    I've tried setting an input on the Mouse Delta but even when I didn't set anything at all on code about the input, Unity keeps giving me errors, I simply don't understand.

    :(
     
  2. pineapuru

    pineapuru

    Joined:
    Mar 21, 2018
    Posts:
    46


    I have tried using Mouse Position and Mouse Delta.

    Update:
    I've noticed my MouseCursor 'action/input' had a 'press' interaction, after removing it my buttons now detect the mouse, but the error still appears.

    Also, when I highlight another button, the button I have selected with my arrow keys doesn't deselect. When I click on a button it also gets 'selected' forever. (I'm using mouse/keyboard).

    Thanks for your attention!
     
    Last edited: Jun 21, 2021