if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began )
{
Ray ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
RaycastHit hit;
if (Physics.Raycast(ray, out hit))
{
Debug.Log("hit.collider.name");
}
}
© U3D初级开发者-水墨 | Powered by LOFTER