Home

Awesome

Spritedow Animator

A plugin to do simple sprite animations avoiding the big and tedious Unity's Mecanim system. Oriented to programmers, if you prefer visual scripting you maybe prefer using Mecanim instead of this.

Installation Guide

Simply copy the files on your project or use the UnityPackage included.

Creating an animation

Use the animation editor to create new animation files. You can open it selecting Sprite Animation Editor on Tools/Elendow tab.

Inspector properties

UI Image Animator Inspector properties

Using the animations

Add the SpriteAnimator or UIAnimator component to the object you want to animate. This component requires a SpriteRenderer or Image component to work. If the object doesn't have one, the animator will add it automatically. On your code, use GetComponent<SpriteAnimator> or GetComponent<UIAnimator> to get the reference and start using it.

Animator Methods

Animator Properties

Animation Actions

private SpriteAnimator spriteAnimator;

private void Awake()
{
    spriteAnimator = GetComponent<SpriteAnimator>();
    spriteAnimator.OnAnimationAction += OnAnimactionAction;
}

private void OnAnimactionAction(SpriteAnimationAction action, SpriteAnimation animation)
{
    // Do something
}

Animator Events

private SpriteAnimator spriteAnimator;

private void Awake()
{
    spriteAnimator = GetComponent<SpriteAnimator>();
    spriteAnimator.OnPlay += OnAnimationPlay;
}

private void OnAnimationPlay()
{
    // Do something
}
public SpriteAnimation walkAnimation;
private SpriteAnimator spriteAnimator;

private void Awake()
{
    spriteAnimator = GetComponent<SpriteAnimator>();
    spriteAnimator.AddCustomEvent(walkAnimation, 5).AddListener(StepEvent);
}

private void StepEvent(BaseAnimator animator)
{
    // Do something
}

Animation Methods

Animation Properties

License

MIT