|
|
|
|
|
|
|
|
|
|
bool TryGetTouchPosition(out Vector2 touchPosition) |
|
|
|
{ |
|
|
|
#if UNITY_EDITOR
|
|
|
|
if (Input.GetMouseButton(0)) |
|
|
|
|
|
|
|
if (Input.touchCount > 0) |
|
|
|
var mousePosition = Input.mousePosition; |
|
|
|
touchPosition = new Vector2(mousePosition.x, mousePosition.y); |
|
|
|
touchPosition = Input.GetTouch(0).position; |
|
|
|
#else
|
|
|
|
if (Input.touchCount > 0) |
|
|
|
else if (Input.GetMouseButton(0)) |
|
|
|
touchPosition = Input.GetTouch(0).position; |
|
|
|
var mousePosition = Input.mousePosition; |
|
|
|
touchPosition = new Vector2(mousePosition.x, mousePosition.y); |
|
|
|
#endif
|
|
|
|
|
|
|
|
touchPosition = default; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
ARRaycastManager m_RaycastManager; |
|
|
|
} |
|
|
|
} |
|
|
|
} |