Alignment Drop-down in a Component

Hello. excuse the stupid question, but i did not seem to find an example to learn from. I am writing a component and one of the public variable items is alignment (center, right, left). I'd like a drop down to appear in the editor to the user where he selects the appropiate alignment.

As there is no alignment enumeration, I need to create one and have a public variable of tht kind (I think). How do I achieve this in javascript?

You have to use enum’s for this. At the moment enum’s are not supported in javascript. Enum’s will be supported with the next major release.

You can define enum’s in C# though. See for example the MouseLook script in the standard assets.

Thanks. Will grab a C# book on the way home ;)