I found this thread when trying to search for more information about the SpriteResolver and SpriteLibrary. This functionality is just what Iāve been looking for to be able to use the same animations with different spritesheets!
Iāve kinda found the same issues as digiwombatāspecifically, the effort required setting up the SpriteLibraries with large (and many) spritesheets. I was curious if there might be some improvements being made. Ted, you mentioned that drag and dropping sprites into a Sprite Library Asset is in the shipped 2D Animation 6.0.0; is this dragging and dropping several sprites at once to create/populate Category Lists, or just dropping sprites one at a time into each Category List item? I downloaded Unity 2021.1 but Iām not seeing bulk drag/drop into Sprite Libraries (though I might still be using an older version of 2D Animation? Iām trying to figure out how to access 2D Animation 6.0.0 in the package manager).
While Iām excited about having this new functionality, Iām weighing how much more work it will be to set up sprite libraries for all my different characters (and different versions of each character). For example, my current workflow to create an animated character prefab:
- Create animations by dragging and dropping many sprites (at once) from a spritesheet into a the Animation window (a few dozen animations, each with spritesheets of 16-32 sprites, so dragging/dropping is great!). 1 step for Y animations, regardless of how many frames are in the animation (thanks to drag and drop creating keyframes for all the sprites in an sprite image at once).
- Create and link animations in the Animator window
- (Repeat 1 and 2 for each new character)
Since #2 can get very complex for my characters, Iām hoping to be able to reuse the Animations and Controllers for multiple characters by utilizing the Sprite Library/Resolver functionality. Additionally, even for the same character, I could use a Sprite Resolver/Sprite Library to give the sprite character multiple skins.
However, with the current workflow (as I understand), in order to use Sprite Library with characters, I have to:
- Create a SpriteLibraryAsset. For each animation, I add a new Category List item in the SpriteLibraryAsset. For each Category List item, I have to type in a Label value, and drag and drop one sprite from the animationās spritesheet to the Sprite input. If this animation has 32 unique frames, I have to type 32 Labels, and drag and drop 32 individuals sprites from the sprite sheet (this is where Iām not seeing bulk drag and dropāthough I thought old versions might have had it from old documentation?). X steps (where X is the number of frames in the animation) for Y animations
- Create animations by moving to each time frame (one by one) and choosing which Label sprite to use for the frame. Repeat for each animation frame (so if there are 32 frames, I go through and choose a time and frame 32 times, as thereās no bulk creation of animations like simply dragging and dropping sprites in a spritesheet). X (where X is the number of frames in the animation) steps for Y animations
- Create and link animations
- (Repeat step 1 for each new character. Steps 2 and 3 are only done once for all characters that share the animations)
So while I can reuse animation and controllers with the Sprite Library/Resolver, it actually makes animation creation a lot more work intensive. I have to set up Category Items for each frame of each animation (both sprite and label) for each character. I also have to set up animation keys for each frame of each animation once (but only once across all the characters that reuse the given animator/controller).
I was hoping an implementation of this might be a bit more simple, like creating animations normally (i.e., dragging and dropping spritesheet frames onto the Animation window to auto create keyframes), but having a way to swap out which spritesheet file is being used to pull individual sprites from. This would require sprite sheets to have the same number of sprites (and maybe even the same dimensions/locations of sprites?), but Iām not sure if this is a dealbreaker for game devs or artists. All my sheets would be the exact same sizes with the exact same number and dimensions of sprites.
Or, at least being able to use drag and drop to create Sprite Library Category Lists from spritesheets (or just multiple sprites) would be a huge improvement. Additionally, being able to quickly/bulk create animation keys from Sprite Library Category Lists would be very cool.
Anyway, just sharing some user experience and input. Thanks, and keep up the great work-