Animating Sprites in Unity
Objective: Create a looping animation for our triple shot power-up.
With the game object selected, go to the Window tab in the top left of the Unity editor and bring up the animation window. When the Animation window opens up, dock it next to the Game/console views.
Once you open up the Animation Window, click create and create a new Animations folder for your project if you don’t have one. Select that folder and name the file after whatever you are trying to animate, followed by _anim for clarity.
Then, select the first frame of the animation while holding shift, select the last frame of the animation to select everything, and drag all the frames into the Animation window’s dope sheet.
Start recording, play the animation all the way through, and stop the recording. Unity will loop the sprite animation by default. If you only wanted the animation to play once, select the animation clip and toggle off the “Loop Time.”