Unity触摸屏触摸事件定义
/// <summary> /// 更新触摸事件 /// </summary> private void UpdateTouchEvent() { if (Input.touchCount>0) { if (Input.GetTouch(0).phase== TouchPhase.Began) { //Input.mousePosition = Input.GetTouch(0).position; } else if (Input.GetTouch(0).phase == TouchPhase.Moved) { } else if(Input.GetTouch(0).phase == TouchPhase.Ended) { } } }