Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


tapCount

Number of consecutive taps that the touch is part of.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public int tapCount { get; set; }

Remarks

The value is 1 for a single tap. Each additional tap that occurs within a short time and distance of the previous tap increases the value by 1, so a double tap reports a value of 2. Use this property to detect double taps and other multi-tap gestures at a particular position.
In some circumstances, the device might incorrectly register two fingers tapped alternately as a single finger tapping and simultaneously moving.