Draw raycast in final build

i have raycasts working and everything is fine there, i just wanted to know if there was a way i could write the draw line code so it draws in the final build. not just for debugging.

Here are a few questions that have answers to the same issue that you’re having:

Also, if these don’t work, it’s beneficial to see your code and what you’re attempting to do so that we can see how to better assist you.

Thinking of it as a raycast just complicates it unnecessarily. Call the raycast start A, and the hitPoint B. Now it’s just a line between two points. LineRenders work. Or just the “center, scale and LookAt” method (using maybe a semi-transparent cylinder.)