This can be achieved with a billboarded sprite and a custom shader that keeps the billboard direction in its right orientation. I don't have the exact code for this though.
You can also enable Distance Fade on the material to make the beam fade out as the camera gets closer (to prevent it from suddenly disappearing if the camera enters the beam).