Is there a way to get a Hash to show up in the inspector like arrays do? But instead of seeing Element 0, Element 1... you would see the actual keys of your hash? As an example, check out the PixelInset property of a GUITexture component. Underneath the property name, you see Xmin, Ymin, Xmax, Ymax, and can enter values for each. How is this done? Can it be done via javascript?
You can't get a hashtable into the inspector. The foldout you can do like this: http://forum.otee.dk/viewtopic.php?t=1743&highlight=serializable While a little bit inconvenient you can create two arrays containing, name -> data.
Will the serializable attribute used in that Button example work in javascript or is that strictly C#? I don't know C# to really understand what's happening there. So I would be much more comfortable if I could somehow do this in javascript. If that's not possible, would I be able to just make the serializable class in C# and then just use it in javascripts... On a related note: How do you make classes in javascript? Like if I wanted to make a generic object that didn't derive from anything? thanks again!
Code (csharp): @System.Serializable class Foldout { var a = 5; var b = Color.white; } var foldout : Foldout; print(foldout.a);