Touch.fingerId:
官方API链接:https://docs.unity3d.com/ScriptReference/Touch-fingerId.html
描述: It is merely a unique id per gesture.
如何理解和正确使用Touch.fingerId:
当手指A和手指B按顺序按下时:
Input.touchCount == 2;touchA对应的fingerId == 0,touchB对应的fingerId == 1
此时,如果抬起手指A,则对应的关系如下:
Input.touchCount == 1;touchB对应的fingerId == 1
通过上述分析得到的结论:
不可以通过Touch.fingerId直接获取对应的Touch。
那么可以通过下面的代码获取Touch.fingerId对应的touch信息:
public bool GetTouchByFingerId(int fingerId, out Touch touch)
{
touch = default(Touch);
if (Input.touchCount ==