Why this code does not print anything after a touch?
void Update()
{
if (Input.touchCount > 0)
{
RaycastHit2D hit = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position), Vector2.zero);
if (hit)
{
print(hit.transform.name);
}
}
}