Unity Remote 3 and accessing multiple Input.touches?

Hello fellow Unity’ers, I’m currently coding my own little project for the new ipad. I’ve read all the docs on implementing Input.touch and have a left arrow, right arrow, fire button on multiple GUITextures that each respond correctly in Unity Remote 3. Only issue I’ve noticed is I can’t press the left or right arrow button and fire at the same time. I’ve been told that there might be an issue with Remote 3 not handling touch.phase correctly. Is this true?

Thanks again.

3 Answers

3

Unity Remote can get laggy, so you can’t rely on it to report phase properly, but the same is true of running natively on an iOS device. You should code your buttons differently.

In addition to the lag you should setup an [Ad Hoc network][1] between the device and your computer. [1]: http://unity3d.com/support/documentation/Manual/unity-remote.html

Ad hoc is always slower for me; the hardware in a MacBook Pro can't compete with a network of AirPort stations.

That's true, my home wireless router is an Apple airport extreme and runs Unity Remote faster than the macbook air built-in router.

That's true. Drift Boss

What solution u used in script…???

Hi Hiren, sorry I can't post the full c# code as it has alot of my custom coding for a potential game I might release eventually. I can say that the reason the Input.touch buttons weren't working because I coded the buttons to handle all the same touch id's. From what I understood, the touch interface has to assign a touch id to each screen touch so it can track it. My initial code allowed only 1 id and that is why the multitouch wasn't working. Hope that makes sense.

Its ok.. I found a solution by using for loop for each touchCount.

Awesome! Great to hear that Hirenkacha!

Thanks for the quick replies. I’ve created a private network between my macbook and the ipad. This is how I know that the GUITexture buttons work individually but not in groups like walking and shooting at the same time. Jesse, you’re right, I need to rewrite my button code to allow multiple presses.

Thanks a mil Jessy. I spent all day yesterday locked in a dark room, goal in mind to get true multitouch buttons and I did it! I don't know why this board won't allow me to click the thumbs up button on your reply. Keep getting "you're not allowed to do that action". Is there anyway I can up your karma somehow? Thanks again!

I liked the idea, it's expected that all this luxury will be from this beautiful game Candy Crush.