0
\$\begingroup\$

I have a model created in Blender for a character with a sprite as a child of the character that I would like to animate. I'm making a turn based strategy game in which I would like to be able to click a character and turn on a "selection circle" beneath the character, much like the way a circle appears underneath a selected unit in games like Star Craft. The selecting of the character(the circle turning on/off) works fine. However, I have a 32 sprite animation that I would like to apply to the selection circle to give it a bit more life. The steps I've take are as follows:

I put my character into the scene

I add the selection circle sprite to the character as a child

I add an animation & animator component to the selection circle

I open the animation window and create a new clip

I drag my 32 sprite sheet to the window

I make sure the "play automatically" check box is selected

When I play the animation in the editor it works fine, but at run time the animation is not present, only a single sprite appears when I select my character. I've noticed that there is warning that appears in the console that says "animation must be marked as legacy" there are about a bazillion questions on here already explaining how to fix this... I.E. Change to debug mode and change animation type to 1(Legacy). I do not see this option anywhere in the inspector when I have the sprite selected. I can change to debug mode but there is nothing under the heading or an component that resembles animation type. I'm using Unity 5. Please, any help would be appreciated.

\$\endgroup\$
1
\$\begingroup\$

Follow these 3 easy steps

1) Select the animation file in the project , and click on the top drop down icon in the inspector.

enter image description here

2) Select the Debug Mode

enter image description here

3) Select the legacy option

enter image description here

\$\endgroup\$
1
\$\begingroup\$

Don't use legacy animations, use the Animator component to play animations instead. Here are some examples:

http://www.youtube.com/watch?v=VG7uZAwZW2o

http://johnstejskal.com/wp/creating-2d-animations-from-sprite-sheets-in-unity3d-pt2/

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.