It is possible - the Unity editor is completely scriptable. In fact, the entire Unity editor itself is actually written using Unity’s own GUI system. AngryAnt’s “Behave” is another good example of how flexible Unity’s editor scripting is.
The downside is that if you want custom widgets for your component, you’ll have to write the entire inspector code for your component yourself. You can’t just modify the look of one or two variables. The documentation is a little scant on this subject though, so good luck!
class MyTest extends System.Object
{
var number = 5;
var color = Color.white;
}
you can add it to one of your behaviour scripts like this:
var testObjectWithNumberAndColor : MyTest = new MyTest();
The result will be that the behaviour script will have a field in the editor called ‘testObjectWithNumberAndColor’. When you expand ‘testObjectWithNumberAndColor’ it will have two fields: ‘number’ and ‘color’ that allow you to fill in an int and a color.
(I assumed you use JavaScript. I have not actually tested the code I provided)
okay sounds nice, I will try your solution tom, thanks to all others anyway. And yes I use JS, I actually dont like C#, I would prefer Ruby as Unity language