i have created the walking & idle animation for my fps player. i've added a java_script to access it. but, when i run it & press button(w), it stops & says that, the animation is not attached to the object.. when i drag the walking/idle animation & drop to that object, it creates an animation controller. again i run it, still same error. i can't find where to attach the animation ?????? thnx for help... @Adamcbrz @Olgo @whydoidoit @VildNinja @hollym16 @ Here's my java script:
function Update ()
{
if(Input.GetKeyDown("w"))
{
GetComponent.().Play("walk_anim2", PlayMode.StopAll);
}
if(Input.GetKeyUp("w"))
{
GetComponent.().Play("idle_anim2", PlayMode.StopAll);
}
}
↧