Multiple Animations for One Object?

When I add 2 or 3 animations to 1 object, only one of them plays. I’ve tried enabling the others through scripting, but that still doesn’t work. Is there a way to do it? I’d like to have my sword-swing animation play while my character is running.

you should be able to call all the animations on the model.

Well I can’t.

When asking questions like this it’s helpful to post part of your script, otherwise we have no idea what you’re attempting to do or what you’ve tried.

From your question it sounds like you want to play animations simultaneously, a run and an attack animation. You’re either going to want to play the attack animation as an additive animation, or only export the animation for the upper body, so the attack animation can override part of the skeleton while leaving the legs alone. (which will look best will depend on your game style and character)

Additive is probably the easier approach though, check out the Unity docs, they explain the animation system pretty well.

Ok. I’ve been reading about Additive Animation and can’t get it right. Now the legs work correctly, but the arms only play halfway through the animation. They ping pong, but just won’t play through.
Here’s my script:

private var ArmsRun : AnimationState;

function Start()
{

	ArmsRun = animation["ArmsRun"];

	ArmsRun.layer = 1;

	ArmsRun.blendMode = AnimationBlendMode.Additive;

	animation["ArmsRun"].wrapMode = WrapMode.PingPong;

	ArmsRun.enabled = true;
	
	ArmsRun.weight = 1.0;

}

function Update () 
{
	
	if(Input.GetKey("w"))
	{
		animation.Play("LegsRun");
		if(!Sword.isSwingingSword)
			ArmsRun.enabled = true;
		
	}
	else
	{
		ArmsRun.enabled = false;
		animation.Play("Idle");
	}
}