public class TouchTest : MonoBehaviour {
void Update () {
Debug.Log(Input.touches.Length); //按在屏幕上的手指数
if (Input.touches.Length > 0)
{
Touch touch1 = Input.touches[0];//第一个手指
touch1.position;//当前触摸在哪个位置
TouchPhase phase = touch1.phase;//获取当前手指的状态
TouchPhase.Began //手指放在上面
TouchPhase.Moved //手指移动时
TouchPhase.Stationary //停止移动
TouchPhase.Ended //手指离开屏幕
TouchPhase.Canceled //系统取消
touch1.deltaPosition
}
}
}