- Home /
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?
Answer by winzcrieg · Feb 11, 2015 at 01:53 PM
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.
Could you please show me a little part of your code? I'm working on this since 2 days... Please help..
Answer by vfxjex · Oct 22, 2019 at 06:41 AM
void Awake()
{
Input.multiTouchEnabled = false;
}
this might not work on Editor using remote. Try building the game.
Answer by zedsmith52 · Sep 02, 2018 at 01:20 PM
I gave this a try and it stopped all the buttons working in the canvas - seems like a Unity bug here.
Your answer

Follow this Question
Related Questions
Unity 2.6 Support Windows 7 multi-touch? 2 Answers
multi-touch woe, index out of bounds? 1 Answer
Multitouch and collision for android 0 Answers
Touch dont work 1 Answer
Multitouch & IDragHandler 0 Answers