- Home /
How can I add a new "Inspector" type?
Prefabs have the grey/blue box icons. Materials have the little grey sphere icon. Is it possible to add a "first class" type to the mix?
I've seen over and over that all of the Unity GUI was built with the editor tools. So how do they do this?
Answer by Bunny83 · Jun 21, 2011 at 03:42 PM
I suggest that you download ILSpy ;). Well, it's almost kinda reverse engineering but if you want to see how the Unity editor is implemented that's the easiest way.
Haha.. is all of this dark arts or what? Will Unity send some o$$anonymous$$ous figures to my house to rough me up if I dig too deep?
:D no, i guess not. $$anonymous$$anaged languages can easily "converted" to any other .NET / $$anonymous$$ono language. The core of the engine is still written in C++ which you can't just decompile. Stay away from the dark-side. You would be more a grey-hat-hacker ;) Just don't "s$$anonymous$$l" code or do evil things and you're fine.
I have no idea what that comment was all about. You don't need to talk down to my just because I am asking for examples / documentation.
I'm just stunned that the 'easiest way' to see some nice complicated Editor source is to peek into DLLs. Surely there is documentation and examples for this somewhere.
All functions that are provided by the Unity API are well documented. All those are pretty easy to use. There are examples out there but "an example" should be as easy as possible that you can understand what a specific function do. Asking for "something" complex is a bit strange.
Unity doesn't offer "complex" examples because the API itself is just a tool. You can use it for whatever you want. It's plain program$$anonymous$$g.
You asked how they created the GameObject inspector. With ILSpy you can see how they have done it.
Your answer
Follow this Question
Related Questions
Accessible collection of Type 1 Answer
Return a custom class from function 1 Answer
Custom GUI Elements in Inspector 0 Answers
Unity not Instantiating as Prefab 1 Answer
Photon Custom Serializer Help 1 Answer