Can I set an enum parameter from an animation event?

Presently I’m calling function Example() on my script using an animation Event like this:

function Example(){

fadeState = FadeState.fadeIn;

}

But is there a way to just directly set that from the event? Like a more efficient way of doing this? As in using the parameter boxesin the “Edit Animation Event” window so that I can simply set the enum and not need to use a specific function at all?
thanks

It should be possible via string parameter, try this:

public void example(string newFadeState )
{
   fadeState = (FadeState)FadeState.Parse(typeof(FadeState), newFadeState);
}