How to disable Multitouch for buttons?

Hi, I have a small card game that I built for WEBGL and I am testing on an Ipad. The individual cards are actually just buttons, so the touch controls are being handled by the UI and the standaloneInputmodule.

The problem is if the user touches more than one button at once, it breaks my game logic completely. I need to disable multiple touches at one time.

I have already tried setting “Input.multiTouchEnabled” to false in the Awake, start and even update functions, in several scripts, in several scenes and I even can see in the editor that it is indeed reading false while the game is running, yet still I can touch the screen multiple times with multi-touches and break the game!

Please, someone help…

If it’s built for webgl, they can’t exactly click on multiple cards anyways, so it’s probably not a big deal. I’m surprised the multiTouchEnabled didn’t work. It’s also possible because you are using buttons, disabling multi touch doesn’t work.

The only thing I can suggest is check in your logic the number of touches. If it’s 1, you can handle the card however you want, if it’s greater than 1, do nothing.

Otherwise, perhaps change it so your cards aren’t buttons and look into the Ipointer interfaces.