kingBook

导航

UGUI双击事件

 经测试在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上就行了

posted on 2017-03-03 14:27  kingBook  阅读(403)  评论(0编辑  收藏  举报