Commit e4e488ce authored by Chae Ho Shin's avatar Chae Ho Shin

Merge remote-tracking branch 'origin/model-ui-integration-work' into model-ui-integration-work

parents 3e18c78d 97beae3b
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.EventSystems;
public class DoubleClick : MonoBehaviour public class DoubleClick : MonoBehaviour, IPointerClickHandler
{ {
...@@ -18,7 +19,7 @@ public class DoubleClick : MonoBehaviour ...@@ -18,7 +19,7 @@ public class DoubleClick : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
} }
// Update is called once per frame // Update is called once per frame
...@@ -30,8 +31,30 @@ public class DoubleClick : MonoBehaviour ...@@ -30,8 +31,30 @@ public class DoubleClick : MonoBehaviour
} }
} }
public void OnPointerClick(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Left)
{
OnClick();
//Debug.Log("Left click");
}
else if (eventData.button == PointerEventData.InputButton.Middle)
{
//Debug.Log("Middle click");
}
else if (eventData.button == PointerEventData.InputButton.Right)
{
//Debug.Log("Right click");
}
}
public void OnClick() public void OnClick()
{ {
/*
if(eventData.button != PointerEventData.InputButton.Left)
{
return;
}*/
if (click) if (click)
{ {
OnDoubleClick(); OnDoubleClick();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment