Change Inspector vars according to Enum

IN the bloom in flares script when you change the Mode enum from simple to advanced, it shows more values than it did before. Ive looked at this script but can figure out how it does this. care to explain?

I guess an editorscript is used for that. Look for the "editor" folder inside your asset folder. There should be a script that act as custom inspector (a class derived from "`Editor`"). The class should also have an attribute like: `CustomEditor(ClassNameForWhichThisEditorShouldBeUsed)`