LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

Input.touchCount

public static int touchCount;

Description

Number of touches. Guaranteed not to change throughout the frame. (Read Only)

using UnityEngine;
using System.Collections;

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