Get a list of options for variable in the script inspector?

I feel like I've seen this before, but I can't figure out how to do it. Is there a way to have a variable have a list of options you can choose in the inspector?

Depending on the kind of variable you want, you could use an enumeration (enum). Enums are automatically serialized and displayed as a little dropdown list in the inspector. e.g.

// declare the enum somewhere visible
public enum MyEnumeratedType 
{
  FirstOption, SecondOption, ThirdOption
}

// in your script, declare a public variable of your enum type
public MyEnumeratedType option;

The underlying value is just an integer, starting from 0 (in this case, FirstOption would have a numeric value of 0).

Of course with a custom inspector, any type can have a list of options.