if (useTouch)
{
// Process touch events first
ProcessTouches();
// If we want to process mouse events, only do so if there are no active touch events,
// otherwise there is going to be event duplication as Unity treats touch events as mouse events.
if (useMouse && Input.touchCount == 0)
ProcessMouse();
}
else if (useMouse) ProcessMouse();