x


How do I draw curves in a custom editor window?

I'd like to create a custom editor window that needs to draw curves (Bezier splines most likely), but UnityEditor doesn't provide any curve/spline drawing utilities. I've noticed a number of editors in the asset store (like Playmaker) that draw curved lines. Are they just using the GL API directly, or are they using another windowing/drawing API other than Unity (like winforms)?

These assets work even on non-Pro licenses of Unity - assuming that they're using the GL API, does that mean that we can use the GL interface on a non-Pro license of Unity (in editor code only)? Or can an editor written with the Pro version work in any version even though the customer doesn't have access to write their own GL editors?

Thanks in advance!

more ▼

asked Sep 29 '11 at 05:45 PM

Azound gravatar image

Azound
668 19 23 39

(comments are locked)
10|3000 characters needed characters left

1 answer: sort oldest

Well, i've worked with Unity since version 2.6 and i had no problems using the GL class in the indy-version. I created some quadratic and cubic bézier-drawing functions and they work well even with the newest version. However the docs specifies that it's a pro-only feature. Maybe it's a wrong statement or they kinda forgot to make it pro only and you can't rely on it in future versions.

Personally i don't think they will remove it from the free version because it's not very performant and actually some kind of basic feature.

If you plan something really big you could try to contact the support to get a clear "yes" or "no" for the future.

I'm still working on a node-based-editor-framework and use a lot GL stuff (but actually only solid colors ;)).

more ▼

answered Sep 29 '11 at 11:44 PM

Bunny83 gravatar image

Bunny83
46.9k 12 50 210

Fantastic - I tried it out myself, and although GL is a Pro-only feature, it works fine in the indie version (at least in the Editor). I imagine it doesn't work in runtime code.

Thanks!

Sep 30 '11 at 01:28 AM Azound
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x175
x70
x43
x39

asked: Sep 29 '11 at 05:45 PM

Seen: 1486 times

Last Updated: Sep 30 '11 at 01:28 AM