- Home /
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?
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.
Answer by ckfinite · Nov 30, 2010 at 03:20 AM
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.
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.