So I made a walking animation and I looped it, but when played it, the animation kept going without me pressing a key. I used this script below:
function Update (){
if(Input.GetKey(KeyCode.W)){
animation.CrossFade("DefaultAnim", 0.2);
}
else{
animation.CrossFade(“Idle”);
}
}
And it still keeps doing it. Any suggestions?