Hi. I’m newbie in Unity, and have a little problem. I’ve got a three .fbx file
jump.fbx (jump animation)
turn.fbx (turn left and right animation)
mixed.fbx (some more animation like run, walk etc.)
and i’ve got this script for move (without animation).
#pragma strict
var walkSpeed : float = 7;
var gravity : float = 50;
var rotationSpeed : float = 10;
var yRot : float;
function Update () {
var Controller : CharacterController = GetComponent(CharacterController);
var vertical : Vector3 = transform.TransformDirection(Vector3.forward);
var horizontal : Vector3 = transform.TransformDirection(Vector3.right);
if(Input.GetAxis("Vertical") || Input.GetAxis("Horizontal")){
Controller.Move((vertical * (walkSpeed * Input.GetAxis("Vertical"))) * Time.deltaTime);
Controller.Move((horizontal * (walkSpeed * Input.GetAxis("Horizontal"))) * Time.deltaTime);
}
if(Input.GetAxis("Mouse X")){
yRot += 10 * Input.GetAxis("Mouse X");
}
transform.rotation = Quaternion.Euler(0, yRot, 0);
}
It working, but my charcter doing only default animation from animator controller.
So i get this script to get animation movement for my character:
#pragma strict
var walkSpeed : float = 7;
var gravity : float = 50;
var rotationSpeed : float = 10;
var yRot : float;
function Update () {
var Controller : CharacterController = GetComponent(CharacterController);
var vertical : Vector3 = transform.TransformDirection(Vector3.forward);
var horizontal : Vector3 = transform.TransformDirection(Vector3.right);
if(Input.GetAxis("Vertical") || Input.GetAxis("Horizontal")){
animation.CrossFade("walk_normal0", 0.2);
Controller.Move((vertical * (walkSpeed * Input.GetAxis("Vertical"))) * Time.deltaTime);
Controller.Move((horizontal * (walkSpeed * Input.GetAxis("Horizontal"))) * Time.deltaTime);
}else{
animation.CrossFade("ArmatureAction0", 0.2);
}
if(Input.GetAxis("Mouse X")){
yRot += 10 * Input.GetAxis("Mouse X");
}
transform.rotation = Quaternion.Euler(0, yRot, 0);
}
But now i get that error in Unity console:
MissingComponentException: There is no ‘Animation’ attached to the “jump” game object, but a script is trying to access it.
And i cant move my charcter in game, but default animation works.
PS.
I use Unity 4.3
All of .fbx file have charcter model
English is my second language, so please be lenient ![]()

Add Component / Misc / Animation to the GameObject
– getyour411Thanks for fast reply! I add Animation component, but now i get this errors: > The animation state ArmatureAction0 could not be played because it couldn't be found! > The animation state walk_normal0 could not be played because it couldn't be found! And that look my GameObject components (i can add only one Animation component, when i've got several animation): [22251-component.png|22251]
– RuskiPOP