How can I create a variable that looks like an enum in the inspector? Do I have to declare it as a class? IE
Or is there a more straightforward way of doing it?
What an enum is, is a set of non-editable named values. You can then make variables of that enum type, and those variables will be settable to any of the named values (with a useful dropdown box).
It sounds like you don't actually mean "enum". Do you just want to organize a set of variables into its own scope? If so, the code you're using above is the most straightforward way of doing it. You shouldn't call it "enum", though, as that's an unrelated concept.
answered May 20 '11 at 10:12 PM