talecrafter / AnimationImporter

Aseprite Animation Importer for Unity
613 stars 72 forks source link

Support for playback direction when importing aseprite files #27

Closed hu9o closed 5 years ago

hu9o commented 6 years ago

Summary

In Aseprite, animations have an attribute direction that changes the way they get played. While it's very helpful (pingpong especially), it's not taken into account when imported into Unity, making for tedious animation hand-editing, either in Aseprite or Unity.

I made changes to support that feature, and tested it a bit on my project.

Details

In the first commit, I removed the frame timings precomputation, because it was not necessary; and while it worked well for normal playback, it would have needed to be adapted for reverse and pingpong.

In the second commit, I added an attribute in ImportedAnimation that's set during parse in AsepriteImporter, and read when during conversion to a Unity anim.

talecrafter commented 5 years ago

Found no problem with this. Working fine with my own animations. Thank you so much for this contribution and sorry for accepting it so late.

hu9o commented 5 years ago

No problem; happy to contribute :)