Beispiel #1
0
 private void CheckClickHoldEvent()
 {
     if (Input.GetMouseButton(0) && EventSystem.current.IsPointerOverGameObject() == false)          // mouse hold and check if pointer are not over game UI
     {
         var pos = RaycastGround();
         if (pos != null)
         {
             OnMouseHold?.Invoke(pos.Value);
         }
     }
 }
Beispiel #2
0
 private void CheckClickHoldEvent()
 {
     if (Input.GetMouseButton(0) && EventSystem.current.IsPointerOverGameObject() == false)
     {
         var position = RaycastGround();
         if (position != null)
         {
             OnMouseHold?.Invoke(position.Value);
         }
     }
 }