Author Topic: Multitouch Not Working On iOS  (Read 10450 times)

badnews

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Multitouch Not Working On iOS
« on: January 21, 2015, 03:15:47 PM »
I've been stuck on this for the last 8 hours, and I have no idea whats wrong.

I have a run and jump button and It's not letting me press 2 buttons at the same time.
For example...
If I'm pressing the run button and try to jump, it will not jump unless my finger is off of the run button.
It works fine when I play in Unity, and when using Unity Remote on iOS, it also works fine.

The problem happens when I build and run, and try to test on an actual device.
I tried an iPad mini and an iPhone with no luck.

I have Multitouch enabled in the camera settings so that is not the problem.
I am very very close to releasing my game, and I am stuck trying to figure this out.

If anybody could help that would be awesome!!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #1 on: January 22, 2015, 11:14:16 AM »
Disable mouse events on the UICamera.

badnews

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #2 on: January 22, 2015, 11:37:09 AM »
Thank you for taking the time to reply.
I haven't been able to find any help so far.

I tried disabling mouse events, keyboard events, and the controller, but still no luck.
The touches are working fine using Unity Remote, but when I build my project, I can't get it to read 2 touches at the same time.

badnews

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #3 on: January 22, 2015, 11:42:02 AM »
I just ran a new test on a new scene and the multitouch is working, but on my main scene I'm still having no luck.

I do have multiple cameras in my scene but I tried disabling all of them except my main camera and still it had no effect.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #4 on: January 22, 2015, 12:31:40 PM »
What version of Unity are you on? I've heard of some weirdness happening on Unity 4.6. If it's working in one scene but doesn't work in another, then I suggest start by eliminating UICameras -- not just disabling but actually removing them. If that doesn't narrow the issue down, and all settings between two scenes look identical, then you will need to add some Debug.Log statements to UICamera to see how the received events differ. You can use NGUIDebug.Log to print to screen on the device. Touches are processed on line 1464 of UICamera.cs -- Input.GetTouch(i).

badnews

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #5 on: January 22, 2015, 01:55:04 PM »
Thank you for your help.
After about 12 hours I finally figured it out.

I am using the plugin "Simple IAP System" and the Shop Manager has a script on it that sets the allow multitouch to false.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Multitouch Not Working On iOS
« Reply #6 on: January 24, 2015, 05:09:49 PM »
It's a poorly made plugin if it sets a global value and doesn't unset it again when it's done...

Good you found it. :)