Skip to content

sgaumin/AnimExpress

Repository files navigation

Anim-Express

Unity 2020.3 License: MIT Twitter URL

Lightweight Unity Utility to quickly setup 2D animations

Installation

You can install this library by the steps below.

  1. Select Window > Package Manager from the menu bar.
  2. Click the + button in the upper left corner of the window and select Add package from git URL....
  3. Enter the following URL in the input field and click Add.
https://github.com/sgaumin/AnimExpress.git

Setup

Animation Asset

After importing texture in the project, we can use utility method to generate animation assets.

AnimationExpressSetup

Animator Component

AnimatorExpress

Features

Play Animation

animator = GetComponent<AnimatorExpress>();
animator.Play("AnimationName");

Stop Animation

animator = GetComponent<AnimatorExpress>();
animator.Stop();

Event Subscription

private AnimatorExpress animator;

private void Awake()
{
  animator = GetComponent<AnimatorExpress>();

  animator.AddListener("FrameName_0", CallBack1);
  animator.AddListener("FrameName_1", CallBack2);
}

private void OnDestroy()
{
  animator.RemoveListener("FrameName_0", CallBack1);
  animator.RemoveListener("FrameName_1", CallBack2);
}

Support

If you ever come across any issues please feel free to report to the Issues page on this repository. All feedback is appreciated, and will be taken on board for any future updates.

License

MIT License

About

Lightweight Unity Utility to quickly setup 2D sprite-sheet animations

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages