mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 22:25:07 +00:00
21 lines
460 B
C#
21 lines
460 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.Events;
|
||
|
using UnityEngine.EventSystems;
|
||
|
|
||
|
namespace HeavenStudio.Editor
|
||
|
{
|
||
|
public class ButtonDoubleClick : MonoBehaviour, IPointerClickHandler
|
||
|
{
|
||
|
public UnityEvent onDoubleClick;
|
||
|
|
||
|
public void OnPointerClick(PointerEventData eventData)
|
||
|
{
|
||
|
var tap = eventData.clickCount;
|
||
|
if (tap == 2)
|
||
|
{
|
||
|
onDoubleClick.Invoke();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|