文档

Unity Engine

Unity Engine

tapCount

Number of consecutive taps that the touch is part of.
阅读时间1 分钟最后更新于 1 个月前

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.