Can We Please Have Sprite Library/Resolver Support for Aseprite Importer?

The Aseprite Importer, which is a godsend of a tool (thank you Unity), is not practical to use in a Sprite Library/Resolver scenario.

Imagine this very common use case. You’ve decided to use Sprite Resolver and Sprite Library as a basis for your player animator in game. You are using the Aseprite importer for its great features. You have all your animations tagged, and Unity already supports those tags in Animator, and that’s great. How do you use it for Sprite Resolver?

You can’t. There’s no way to create a Sprite Library with categories derived from those tags, and no setting to convert your keyframes into Sprite Resolver hashes. That’s a bummer. But you press on. You manually create your Sprite Library and create all your tags as categories. You drag and drop your frame animations into the categories by hand. You have a very basic set of animations, but with walk, run, jump, crouch, attack… that’s already 5 categories and easily 30 frames. It’s an annoying task, but understandable.

Then you run into your second major issue. Over the course of normal game development you need a new animation. You’re handed down a crate push animation or some such thing. So you add it to your ase file and tag it appropriately. You export.

Your entire Sprite Library now has incorrect frame animations.

The importer attempts square packing at powers of 2. That means there is no way to predict where the sprites end up on the sheet at save time, and there is no ‘safe’ setting that prevents label order from being overwritten.

Some Unity dev time on this issue would be extremely appreciated for everyone who uses Sprite Library/Resolver, as long as this is a feature that Unity wants to support long term.

Hello CoraBlue,
Thank you for reaching out with this feature request. It is great that you not only post the request, but also give some background to your issue at hand.
I totally think we should add Sprite Library support for Aseprite Importer. It is actually something I’ve been tinkering with on the side. I can’t promise when we can get it into the importer, but now that I got a good use case for it, I think we can bump the importance for the work.

One question for you, when I’ve been poking at this problem, I’ve used the layers as the Sprite Library Category and the Cells as the “Label”. Would this still work for you, or do you have a different setup in mind? You mention tags being Categories, could you dig into why you would want that?

Ah! That’s because you’ve got that 2D skin skeletal system in mind, yes? In that case I totally understand why you’d use layers as categories and this is probably why Library and Resolver were made.

In my situation I am using the system for normal pixel art sprite sheets. Here is my train of thought.

  1. Animators are large, complicated, and a pain to make. Reducing work on these is huge.

  2. My characters functionally use the same Animator. They use the same script to set all their flags, etc. Library and Resolver is great for this case. You can make your keyframes once, use the same animator, and effectively swap out the sprite-sheet by changing the library.

  3. A finished character might have 100 or more frames. That wouldn’t look very nice crammed into a single category. Soon you’re scrolling through it for your 12th character wondering, “Where the heck is the backflip animation so I can replace the label?” or, “What animation is this from again? What am I supposed to be dragging and dropping here?” You may also be animating hashkeys, scrolling through a tiny little inspector window that only fits 4 frames or so.

  4. It’s at this point the categories start naturally calling out to be used. I use them to mirror my tags, making replacing keyframes easy and the Library easy to navigate and find what I need.

That said, if this was all automated and I never had to navigate it, this is all a moot point. But some really specific annoying stuff (for Unity devs) would have to happen to make sure I don’t have to touch it much.

Lets say you make your master animator and animate all the hashkeys. I’m still going to have to drag and drop every single keyframe unless Unity automates this somehow. That’s not trivial. Aserprite tags are handy information there, but how does that tie into Sprite Library? There are also a hundred edge cases. What if CharacterA has 12 run frames and CharacterB has 8? Library doesn’t handle that well.

This is getting long, but hopefully I’ve given a good general overview. Here if you have any follow-ups.

Edit: It occurs to me that you did say you’re using the cells as label names, and you could grab tag info that way in a array. You’ve clearly thought about this a lot already so I have trust.

Thanks for writing down your take on the solution. You are highlighting some good points, that by using the layer as category, the category might be difficult to navigate in the UI, as if you use merged, all the layers will be merged into a single layer.
I’ll do some experiments with your feedback in mind, and we’ll see where we end up at the end. I really appreciate the feedback.