Is there a method that draw lines (like flash) so I can give it a thickness color and transparency, and of course start - end points …
If you want to draw lines in 3D space you can use the LineRenderer, but that won’t draw them in “2D” in particular. Although with creative use of a special camera that only renders your line, then that camera renders into a texture, you can then display that texture as part of your user interface and thus get “2D line drawing” as an end-result.
It could be a lot simpler than that. You could use a GUI label of the line, and GUIUtility.RotateAroundPivot to make the line go the right direction. A little automation and a DrawGUILine function could be made…
Good thinking!
Hey folks,
I was looking to do something similar, but I can’t quite figure out what you mean when you say “You could use a GUI label of the line”. Does that mean you create the line with GUI.Label itself? My apologies for being dense.
Thanks,
Jared
You can use either text or images as the content to display in a GUI.Label(). So you make a simple image that represents your line and draw it in a label (the image should stretch to match the width). Normally the label will be drawn horizontally so that only works for horizontal lines, but by rotating the label (using GUIUtility) you can rotate the line to whatever angle/slope you need.
I’ve not done that myself in practice but it makes good sense to try it out.