Version: 2017.3

Input.touchCount

切换到手册
public static int touchCount ;

描述

触摸次数。保证在整个帧期间不会更改。(只读)

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Update() { if (Input.touchCount > 0) print(Input.touchCount); } }