Animation blending.

I've tried working with a couple of scripts for my running animations, but they don't seem to be working. What I basically want to do is animate a character's walk and run animations seamlessly. When the character's speed is less than 1, it's just walking. Between 1 and 25, it slowly graduates toward fully running, and at 25 and over, the character is full-on running.

How is this done? Perhaps there is a good reference aside from the Character Animation tutorial in Unity's site? (That one didn't help me learn, nor did it come close to working.)

Normally walk and run animations don't get blended in that way. The normal case would be to check if the speed is over a certain threshold and then crossfade to the run animation. Depending on how long the fade is this will be seamless. To do this use:

animation.CrossFade(newAnimClip, time);

If you want to do it your way you would have to set up the two animations with weights and then change both weights according to your speed. I never tried this and it will probably look odd, but to do this you would have to do something like this:

float maxSpeed = 25;
float weightRun = speed / maxSpeed;
float weightWalk = 1 - weightRun;

animation.Blend("walk", weightWalk, 0.1);
animation.Blend("run", weightRun, 0.1);

As I said this isn't tested, but should give you an idea.

You say that it doesn't work, but that doesn't provide much information. How does it not work? What results or errors do you get?

If your walk and run animations have different lengths (which is likely) you can use Animation.SyncLayer() to keep them synchronized.