- Home /
What's the best way to draw a 2D line WITHOUT using LineRenderer?
LineRenderer simply does not work right and it's driving me crazy. There are hundreds of posts on issues with the line not being visible due to rendering behind ALL other game objects, and there are tens of different fixes listed, none of which have any effect for me. Does anyone have suggestions on how to go about drawing lines without using the incredibly broken LineRenderer?
Nothing broken about LineRenderer. If you need it to hide behind other objects then you can use a different material and shader.
Answer by Vega4Life · Dec 11, 2018 at 04:01 PM
Here is something you can try, but I am not sure if it works on all platforms. Its low level graphics.
https://docs.unity3d.com/ScriptReference/GL.html
Thanks, I believe from what I was reading earlier that the width is fixed at 1 pixel for GL.LINE and can't be changed though, If that's the case it's unfortunately not going to work for what I need. $$anonymous$$ay be helpful for others though.
What do you think about this method? Lines, LineStrip... https://docs.unity3d.com/ScriptReference/$$anonymous$$eshTopology.html