2D Single Sprite Animations [Best Practices]

Hi all, this is my first thread on the forum. :slight_smile:
I started my first 2D game development project recently, Iโ€™m setting all player animations and I need to create an animation of a single sprite. The first idea I had was to create the animation dragging the sprite in the Animation tab and to use it in the Animator State Machine like i would do with multiple-sprite animation.

Could it be a good solution or are there better practices? Iโ€™m open for all your suggestion! :slight_smile:

I donโ€™t know what best practices are, but I use a simple animator script to animate my sprites. Each frame, it increments a timer with Time.deltaTime, and when the timer reaches timerMax, it switches to the next sprite in an array of sprites. The loop can easily be started or stopped by enabling/disabling the script or using a boolean.

1 Like