raycast on a line renderer

Hello,
Can i perform a Raycast on a LineRenderer? To be more clear, i’ve a LineRenderer drawned at runtime, now i need to perform a raycast from my mouse positision to line renderer, but when i perform a raycast, it dosen’t found nothing… Any idea? thanks!

Raycasts only perform checks against colliders not renderers. If you want to raycast against them, you should also add a collider to the gameobject with the lineRenderer.