Event.clickCount

public int clickCount;

描述

我们收到了多少个连续的鼠标点击。

EventType.MouseDown 事件中使用;使用它来区分单次点击和双击。

using UnityEngine;

public class Example : MonoBehaviour { void OnGUI() { Event e = Event.current; if (e.isMouse) { Debug.Log("Mouse clicks: " + e.clickCount); } } }

Did you find this page useful? Please give it a rating: