Can I use the animation component with a mecanim rigged character?

Is it possible to use the animation component (not animator) with a character that has a mecanim humanoid rig? I haven’t been able to figure this one out yet, but I would love to, because I can’t seem to wrap my head around mecanim. I can’t get characters to grapple with each other using mecanim, but I can with the animation component and my scripts.

So, is it possible?

It would be easier to answer if you were a bit more specific on what you intend to do with the animation component, but in broad terms, you can get some information about the current animation being played using the AnimatorStateInfo or AnimatorClipInfo. However, to control the animations you have to use the mecanim way, so use the parameters/states and all the other stuff.

This doesn’t mean that you must use mecanim! you can still use the animation component and manage the animations yourself, the humanoid type shouldnt give you any issue.

If you just want to trigger the animation when colliding, can’t you add a trigger collider to the dummy, add a script to the dummy where you have:

void OnTriggerEnter(collider other) {
    if (other.CompareTag("Player")) {
        yourAnimator.SetTrigger/SetBool/SetFloat("YourParameter", yourValue);
    }
}

If you just want to trigger the animation when colliding, can’t you add a trigger collider to the dummy, add a script to the dummy where you have:

void OnTriggerEnter(collider other) {
    if (other.CompareTag("Player")) {
        yourAnimator.SetTrigger/SetBool/SetFloat("YourParameter", yourValue);
    }
}