Unity之拓展Button:支持雙擊與長按

雙擊直接利用的eventData.clickCount實現,而長按則是在PointerDown的時候記錄時間,而後在Update裏判斷時間便可,因爲代碼比較簡單,直接上源碼。web using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems
相關文章
相關標籤/搜索