Search Unity

Does the new Unity Input system replace the old OnClick from Buttons?

Discussion in 'Input System' started by roseportalgames, Sep 10, 2021.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    Hi everyone,

    I am wondering if the new Unity System replaces the old events like the OnClick that is used by the Button component?

    And I'm also wondering how I can use the new Tap feature in the input system to check whether a button is being clicked?

    Thank you.
     
  2. ZingZangGames

    ZingZangGames

    Joined:
    Dec 11, 2020
    Posts:
    73
    For your first question, no you can still use all the events.
    You can check if a button is pressed by button.AddListener() (i've not used mobile input yet, so I can't help you with the tap feature..)
     
    roseportalgames likes this.