[유니티 스크립트 소스] 마우스 더블 클릭
2021. 2. 2.
using UnityEngine; public class MouseDoubleClick : MonoBehaviour { public float m_DoubleClickSecond = 0.25f; private bool m_IsOneClick = false; private double m_Timer = 0; private void Update() { if (m_IsOneClick && ((Time.time - m_Timer) > m_DoubleClickSecond)) { Debug.Log("One Click"); m_IsOneClick = false; } if (Input.GetMouseButtonDown(0)) { if (!m_IsOneClick) { m_Timer = Time.time; m_IsOneC..