x


Expanding the GUI

I have created numerous editor scripts but there is one thing I cannot understand. How do I go about creating different GUI elements such as the splines in the StrumpyShaderEditor? Or just anything that isn't native to Unity's built-in GUI?

alt text

I know that the developer created a C++ plugin so I have played around with the examples found on the manual, but here is where I am dumbfounded; how do you even start the code for creating something visual that isn't built-in the Unity's GUI? Are there any examples or documentation? Is it the equivalent of creating a standalone GUI from scratch?

If someone could please point me in the right direction I would greatly appreciate it.

more ▼

asked Nov 25 '10 at 12:28 PM

AquaGeneral gravatar image

AquaGeneral
287 3 4 20

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

1 answer: sort voted first

You might try this: http://unity3d.com/support/documentation/Components/gui-Extending.html

What I suspect that he did in StrumpyShaderEditor is draw Labels with Texture2D objects containing the the splines. He also used his own GUIStyle for the custom objects.

If you want to create your own GUI system, might want to disassemble the UnityEngine dll to see how the Unity people did their GUI objects. I learned a lot about UnityGUI looking through their code.

more ▼

answered Nov 30 '10 at 03:20 AM

ckfinite gravatar image

ckfinite
1.3k 5 9 24

Thanks for the reply :)

It would make sense if he did use Texture2D objects. I was going to ask if the splines were actually 'pictures' earlier, but I ended up leaving that question out for whatever reason.

I have contacted the creator (stramit on the forums) and he directed me to his post here: http://www.strumpy.net/?p=23

He also said he might write a new blog post in the future explaining another topic.

I had no idea it was possible to disassemble a .dll file. That sounds like a great idea! I will look into it later.

Nov 30 '10 at 05:53 AM AquaGeneral
(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:

x3815
x409
x351

asked: Nov 25 '10 at 12:28 PM

Seen: 1670 times

Last Updated: Nov 26 '10 at 12:05 AM