- Home /
2D Animation.Play does no effect
Good day to all!
Short intro: I`ve added the spreadsheet to the assets, sliced it, put one of the slices to the scene, created 2 animations based on the slices and set their Animation Types to 1 (as I found out, for making it Legacy). After that, I`ve created the script and dropped it to the slice on the scene:
if (Input.GetKeyDown ("5")) {
animation.PlayQueued ("anim_right_down_up");
Debug.Log("Pressed 5"); }
The question is that when I press "5", the console gives the needed message, but there is no animation (as well as error or warning messages)
I`ve spent so much time solving this problem, so I would be glad to get any clues. Thanks in advance
Answer by OrangeJoe · Jan 02, 2014 at 06:51 PM
Ive sorted it out. Hope it will be useful for someone. The solution was in accessing animator instead of animations. I
ve set the Animation Types back to 2 and called animator`s "Play" function, giving the name of the new state
Your answer
![](https://koobas.hobune.stream/wayback/20220613125349im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Need help with tool animations!! 1 Answer
Can I make animations snap to a frame? 1 Answer
Mouse Click Walk to Idle Animations 0 Answers