经测试在Android、ios平台下无效
using UnityEngine; using UnityEngine.EventSystems; using System.Collections; using System; public class HitSecondTime : MonoBehaviour,IPointerClickHandler{ public void OnPointerClick(PointerEventData eventData) { if(eventData.clickCount == 2) { print("2 hit"); } } // Use this for initialization void Start () { } // Update is called once per frame void Update () { } }
挂载触发的UI上就行了