- Home /
Input.touchCount won't return 2 or more on iOS.
Hello!
I have a project with a number of scenes in it. One scene will not detect more than 1 touch.
void Update() {
Debug.Log("touchCount: " + Input.touchCount);
}
This function always returns 0 or 1, but only in one specific scene. I'm assuming something in the scene is affecting Unity's Input class.
Does anyone have any idea what could cause this? I've been looking around for a couple of hours but I still don't have any idea why I can't get more than one touch on an iOS device.
NGUI and FingerGestures are being used so maybe it has to do something with those? But only in this scene? So weird!
@Garth-Smith did you ever find the bug? I'm dealing with a similar issue except it spreads from the affected scene so previous scenes that worked fine begin experiencing this issue.
Hi, did you find the cause of your problem, i'm facing the same issue. It seems related to the project itself
Answer by Codein · Aug 27, 2017 at 06:22 AM
I don't think the same... If i start a brand new projet with that debug log,
void Update() {
Debug.Log("touchCount: " + Input.touchCount);
}
It will work as expected, even on iOs. It seems to be something with the project and not an Unity bug.
This does appear to work correctly. I removed my answer, since I was mixing up touchCount with PointerEventData.clickCount, which apparently isn't supported on mobile (or at least wasn't a while back).
Your answer
![](https://koobas.hobune.stream/wayback/20220613104214im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Detect a tap versus standing touch on iPhone? 3 Answers
Help with touch input for iOS please! 1 Answer
Touch input reporting 0 delta for first several Updates on iOS, 2 Answers
Touch joystick tutorials ? 0 Answers
Best way to get to get touch inputs? 1 Answer