Search Unity

With the new unity input system. How do I setup UI buttons like in the old system.

Discussion in 'Input System' started by hayone1, Aug 30, 2020.

  1. hayone1

    hayone1

    Joined:
    May 20, 2017
    Posts:
    8
    Yeah, so I'm looking for a result equivalent to the old UI(click/touch) input button component where I can set an object to be "intractable" without using colliders. So I can interact with individual buttons in the canvas to perform actions (eg. "submit, "point", "click" - sendmessage or invoke unity event). So far the player input component can detect UI interactions, yes. But when I place the player input even on a single gameObject and set its Behaviour to "invoke unity events", it seems to detect whatever I do on the whole canvas(even if I click somewhere that's not on the button, it'll still invoke the event). If code is the solution, then something re-usable on all my UI buttons would be much appreciated. I have the new system UI input module enabled on my event system object on unity 2019.4.3f1. Annotation 2020-08-30 090704.jpg