- Home /
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.
Answer by Jessy · Apr 09, 2012 at 01:30 PM
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 between the device and your computer.
Ad hoc is always slower for me; the hardware in a $$anonymous$$acBook 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.
Answer by NorthernEagle · Apr 09, 2012 at 11:07 PM
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 $$anonymous$$d to get true mul$$anonymous$$ch 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. $$anonymous$$eep getting "you're not allowed to do that action". Is there anyway I can up your karma somehow? Thanks again!
Answer by hirenkacha · Apr 26, 2012 at 06:44 AM
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. $$anonymous$$y initial code allowed only 1 id and that is why the mul$$anonymous$$ch wasn't working. Hope that makes sense.
Its ok.. I found a solution by using for loop for each touchCount.
Answer by asianfanfics68 · May 02, 2019 at 10:15 AM
I have read your article, I find the content quite interesting and detailed, I hope in the near future, you will have more interesting and meticulous articles to give readers insight. More about this issue, Thank you for sharing this article.