clickCount
How many consecutive mouse clicks have we received.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.UICommonModule
public int clickCount { get; set; }
Remarks
Used in EventType.MouseDown event; use this to differentiate between a single and double clicks.
Examples
using UnityEngine;public class Example : MonoBehaviour{ void OnGUI() { Event e = Event.current; if (e.isMouse) { Debug.Log("Mouse clicks: " + e.clickCount); } }}