Animation Events, how is the parameter "AnimationEvent" used?

Hey there, I can’t find an explanation for this part of the documentation:

The parameter can be a float, an int,
a string, an object reference, or an

Anyone know exactly how you go about passing an animation event into a function and how that could be used practically in code?

Can’t find anything other than this:

which doesn’t exactly get emotional over the details.

Thanks very much!


I just discovered this. You can simply have a single AnimationEvent parameter in your event handler function.

public void MyAnimationEventHandler (AnimationEvent animationEvent)
    string stringParm = animationEvent.stringParameter;
    float floatParam = animationEvent.floatParameter;
    int intParam = animationEvent.intParameter;
    // Etc.

In the Unity Editor, just fill in the fields: