hellos.
Unity experimenting, I am facing a problem.
I’m pretty new to coding and I learn from tutorials and info from the internet.
I have this script (example) which is my real code with the same two errors in the console.
When you imported your animations, they should have been given a name, which is a string. The crossfade function is looking for a string name of an animation. You gave it an animationClip, so it shows an error.
without the line numbers, I really can’t say what the other error is. You may be able to name it in script if it isn’t already:
walkAnim.name = “walkAnim”;
if it does already have a name, don’t rename it.
then pass the name to crossfade function:
Crossfade(walkAnim.name);
If you read the errors and think about them, you should be able to figure out what’s wrong in most cases.