New UI: disable multitouch

Hi, everyone! I am wondering if it is good to disable multitouch with new UI with this Input.multiTouchEnabled?
Could you please advice me, where it is better to execute this code?

Also, I am curious if there is a more advanced method of handling touches within new Touch input module or Eventsystem?

Hi,

We had a similar doubt when implementing our UI with the new Unity UI. Our UI was getting messy when more than one UI button was pressed simultaneously and we wanted to disable that and allow only one input touch.

So we set the “Input.multiTouchEnabled” to false in our first scene manager’s Awake() and it worked fine. Only one UI element was taking input/touch after that. Although, in the Unity editor Input.multiTouchEnabled was still showing as true even after setting to false but when built onto a device, it worked without any issues. We haven’t checked with Unity remote.

Even in our gameplay we don’t need multitouch, so I guess its fine.

We searched in Unity docs but couldn’t find any other way or better way to disable multi touch with the new Input Modules or EventSystem.

Hope it helps. Cheers.

void Awake()
{
Input.multiTouchEnabled = false;
}

this might not work on Editor using remote.
Try building the game.

I gave this a try and it stopped all the buttons working in the canvas - seems like a Unity bug here.