onclick() for buttons with touch on new input system

Hi,
I’ve started working with the new input system, and I was wondering what’s the best way to enable “on click” functionality on an in-game button with touch.

In the old input system, I could easily drag a game object and enable the functions I wanted on a button, but now - I’ve defined “swipes”, by calculating the first Touch.PrimaryContact started and canceled, but this completely disables the option for using the “on click” functionality like the old input system. The button just doesn’t register it as an “on click” call.

Do I actually need to register each button?
Or worse, calculate the touch position, get the button object, and then try “onClick”?
This really puts the touch controls in a weird place.

Any solutions?

I have the same issue, but it was working fine in the 2021.1 branch, seem to be broken in the 2021.2.0 version using input 1.1.1 or 1.2.0.

Will test 2021.2.1 to see if it’s fixed

Nope 2021.2.1 don’t fix it