|
Hi I'm trying to use the function Handles.DrawAAPolyLine to draw a line in the scene view. However I can't seem to set the width of that line, it looks like it is 1 unit wide all the time. In the docs it points to HandleUtility.GetHandleSize to help adjusting the width, but I can't find where to use it. The syntax is as follows:
By using reflection I can see that Handles internally calls a function with a width parameter
But that function is private, so I can't use it. Anyone got any suggestions? Thanks in advance
(comments are locked)
|
|
reading this page: http://unity3d.com/support/documentation/ScriptReference/Handles.html You have to initialize the drawing system before you can actually use it. Similar to the runtime class GL. Research the main class 'handles' and i hope that gets you going :D EDIT: Realized this question is old, but hopefully someone can benefit from a pointer in the right direction Matty Handles.DrawPolyLine works fine, Handles.DrawAAPolyLine doesn't ... looks like a Unity bug to me. :-p
Sep 08 '11 at 01:10 AM
yoyo
I havn't tested myself, so i couldn't confirm. So touche, that sucks =P bug needs filing! haha
Sep 08 '11 at 02:28 AM
vxssmatty
(comments are locked)
|

I tried DrawAAPolyLine for the first time today. I can't get it to draw anything.
There are overloads that take a width parameter, but that doesn't seem to help.
Note that you could use reflection to get a MethodInfo for the private method, then use MethodInfo.Invoke to call it. Dirty, but it might work. I'm not that desperate ... ;-)