- Home /
iPad input blocks the code that follows
In my project i have a static class called inputManager that has some methods called swipe, tap, etc. The methods have code for iPhone Input and for mouse input. When i call this methods from the update() of an object, the rest of the update doesn't execute when i test the game on my iPad, but on my computer it does. I tested this with 2 float numbers which i increment every frame. the code looks something like this:
void Update()
{
debugFloat1 += 0.01f;
inputManager.Tap();
debugFloat2 += 0.01f;
}
Both the floats stay the same when i test it on the mac, but when i test on my iPad, only the first float increments.
What could be causing that? Is iPhone input blocking (i doubt it), and if it is, how can i fix it?
Answer by ________ · Aug 07, 2013 at 01:42 PM
Tap() could be throwing an exception.
solved it. i was using input.getTouch(index) when i had no touch. I put an if(input.touchCount != 0) in front of it and it worked