Animation blending with a script

hello together

I have a little problem with the script I have from the documentation site from unity. in the screenshot you can see that there are 2 mistakes in the script and I have no idea what’s wrong. So you have to know that i can’t program and I’d be very happy if someone could help me.

thank you very much :wink:

The mistake is trying to access the animation component directly. You aren’t able to use that method to access a GameObjecct’s animation component anymore.

Instead you will want to use this method:

GetComponent<Animation>().CrossFade("anim");

Hope that helps.

Thank you very much :slight_smile: