function Update ()
{
if (Input.GetMouseButton (0))
{
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit))
{
Debug.DrawLine (ray.origin, hit.point);
print(hit.collider.gameObject.name);
}
}
}