Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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


    May 20, 2017
    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