- Home /
unity 4.3 sprite script
i'm have successfully animated a sprite sheet but i can't use the script to control the animations, for example if want to press a button to make my character walk and call the animation which moves his legs. i tried to do something like this:
Animator anim;
anim = GetComponent<Animator>();
and in the update function
if(Input.GetButtonDown("walk"))
{
anim.SetTrigger("go");
}
where go is a .anim file in my assets that already has an animation set, but when i press the the button i get get a warning at run time "Parameter 'go' does not exist" although there is a go.anim file in my assets. so what can i be doing wrong?
Your answer

Follow this Question
Related Questions
Moving pivot point For a 2d sprite 3 Answers
Can't see Unity 4.3 sprite layer behind Refraction object 0 Answers
Physics2D.Raycast seems tied to 3D z coordinate? 0 Answers
Resources.Load sprite returning null (4.3) 3 Answers
Unity 4.3 Any chance Sprite mesh will become accessible in futur update ? 1 Answer