MouseClickCounter.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouseClickCounter : MonoBehaviour { int clickCount = 0; void Update() { if (Input.GetMouseButtonDown(0)) { Debug.Log($ "<i>click</i> <b>count</b> <size=20>=</size> <color=cyan>{++clickCount}</color>" ); } } } |