if (Input.GetMouseButtonDown(0))
{
Vector2 V = Input.touchCount > 0 ? Input.GetTouch(0).position : new Vector2(Input.mousePosition.x, Input.mousePosition.y);
}
射线检测
if (Input.GetMouseButtonDown(0))
{
ray = Input.touchCount > 0 ? Camera.main.ScreenPointToRay(Input.GetTouch(0).position) : Camera.main.ScreenPointToRay(Input.mousePosition);
}