show class in inspector

i want to show i self made class in the inspector like this:

that means i enter the number i want to have and then i can enter the values there.(like the custom guistyle in a guiskin object)

is there a way to achive this?

Add [System.Serializable] above the class in c#, or @System.Serializable in JS.

I’m assuming you’re using c# since the serializable is implicit in JS.

[System.Serializable]
class MyClass : whatever
{
  string myFoo;
}

it works! thank you very much :smile: