Search Unity

UI : buttons don't work with new system

Discussion in 'Input System' started by Excilyano, May 8, 2019.

  1. Excilyano

    Excilyano

    Joined:
    Jan 25, 2015
    Posts:
    1
    (... or rather, I don't know how to have them work)

    Hi everyone,

    I'm trying to implement the new input system on a small game that worked fine with the previous input system.
    While I managed to make it work with this new input system, I find myself unable to create a functional UI.

    I have explored a bit this forum, and from what I saw, UI support has yet to be fully implemented. However, I understood that I should be able to make UI work if I don't have to consider multiple controler controling multiple UI... (correct me if I'm wrong)

    For now, I followed those steps :
    • Project Settings > Player > Active input handling > "Input System (preview)" (didn't want to use "both" as I would like to have a fully functional game with only new input system)
    • Removed the "Standalone Input Module (script)" from my EventSystem
    • Added "UI Action Input Module (Script)" to my EventSystem, and set one key to move between buttons (Move Action), and one key to submit the action (Submit Action)
    • Didn't change anything on my button
    With those steps, I am now able to move correctly between my buttons, but I can't trigger them. Neither can I trigger them with a left click.

    From the look of it, it seems rather obvious to me that I do something wrong with my buttons (since I didn't change a thing compared to previous input system)... but, I have no idea what I am supposed to do.

    Any help will be much appreciated :)


    I'm new on the Unity forum, so please tell me if I did anything wrong with this thread :rolleyes:
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    You probably want to wait for the next new version of the Input System package which basically contains a rewrite of the "UI Action Input Module" (now renamed to "InputSystemUIInputModule"), which will likely work much better.
     
  3. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Will this grab UI Elements input in the Editor itself (i.e. not _only_ at runtime) as well?
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    No.
     
  5. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Are we going to have the possibility to grab input in the Editor UI itself going forward?

    For example, I would like to have keyboard keys repeating in the Editor (without a delay first) like the way the WASD keys move around in the scene view.

    Grabbing these sort of events in the UI Elements would be helpful for certain kinds of assets like my own.