Draw a 2D line in Screen space in the scene editor

Hi there,

I was just wondering how I could draw a simple 2D line, in screen space in the scene view? Much like a gizmo but 2d. Is this possible?

Many thanks, Mike

Also if you look at the FPS Tutorial that someone wrote at Unity (it's a great tutorial actually, I highly recommend it if you haven't already checked it out...). Anyhow, in that example and I think I saw it somewhere else in their stuff too, but they make a 'Waypoint' class. If you fly around in the project you'll notice some little yellow 'W's' in the scene near the big bot chars. If you click on one of those they have a script attached to them that does similar line drawing. You need to tell the waypoint to update it's connections to the other nearby waypoints, and once you've done that (right click menu on the 'w's' props I think) the red lines will show up in 3D space, connecting any nearby waypoints that can see each other - it does tests with raycasts to make sure the waypoints can see one another, pretty decent design.

Hope that helps too, best regards, -=VRMan3D.com=-

My bet is that you are looking for something like Gizmo.DrawLine or DrawGizmo.

Once you got that one, you can start playing with values from other objects, like e.g. the scene camera functions and the objects you want gizmified.

Check this out: http://www.unifycommunity.com/wiki/index.php?title=DrawLine