public int fingerId ;

Description

触摸的唯一索引。

所有当前索引都在 Input.touches 数组中报告或通过等效索引使用 Input.GetTouch 函数进行报告。但是,各帧的数组索引不保证相同。但 fingerId 值在各帧中一直指的是相同的触摸。在分析手势时,此 ID 值非常有用,它比通过手指接近上一位置来标识手指更为可靠。

Touch.fingerId is not the same as "first" touch, "second" touch and so on. It is merely a unique id per gesture. You cannot make any assumptions about fingerId and the number of fingers actually on screen, since virtual touches will be introduced to handle the fact that the touch structure is constant for an entire frame (while in reality the number of touches obviously might not be true, e.g. if multiple tappings occur within a single frame).