Hello,
i want to test touch input script on my laptop with a touchscreen. Im testing that code from example but it doesnt show anything. Is it even possible to test touch functions in the unity scene play?
using UnityEngine;
using System.Collections;
public class touchtest : MonoBehaviour {
void Update() {
int fingerCount = 0;
foreach (Touch touch in Input.touches) {
if (touch.phase != TouchPhase.Ended && touch.phase != TouchPhase.Canceled)
fingerCount++;
}
if (fingerCount > 0)
print("User has " + fingerCount + " finger(s) touching the screen");
}
}