EnumFlagPropertyDrawer

Unity3d property drawer for automatically making enums flags into mask fields in the inspector. Usage: Put the second .cs file in an Editor folder, and put the second somewhere *other* than the Editor folder. When you have an enum field you want to turn into a mask field in the inspector, add the EnumFlag attribute over the field. Eg:

The enum declaration needs to have bit flag values assigned to it, as shown in this example code. Then use the HasFlag method on the enum value.

EnumFlagAttribute.cs

EnumFlagDrawer.cs