I Made a Batch Sprite Animation and Library Creation Tool for Unity
Recently, I’ve been playing around in the Unity Engine. Usually, for my own personal projects, I’d usually turn to Unreal Engine or Godot — but once I started creating in Unity, I fell in love! The one thing that bothered me is how long it takes to create 2D animations — especially if you have a spritesheet with multiple animations, or character spritesheets who follow the same layout.
Because of this, I decided to make my own tool to help solve my own problem. SpriterNator is a Unity extension that simplifies the process of generating and managing 2D sprite animations and sprite libraries. This tool makes it easier to create, organize, and export sprite-based assets within the Unity ecosystem.
With this tool, you can batch create and manage Animation assets and Sprite Library assets — which will help reduce development time, allowing you to focus on the creative aspects of game development! 😊
You can find the package and the repository that I created for it below:
FEATURES
Batch Animation Creation
Automatically generate multiple animations from a single spritesheet, reducing manual setup time. Define animations using start and end frames, and export them as Unity Animation Clips (.anim).
Sprite Sheet Swapping
Effortlessly switch between spritesheets that follow the same layout. This feature is for developers working with characters or objects that have multiple skins or states, enabling quick swaps without needing to adjust frame ranges or manually creating or dragging animations.
Animation List Management
Add, remove, and duplicate animations directly from the tool’s UI. Organize your animation sequences efficiently, with support for reordering through intuitive controls.
Save and Load Presets
Save your animation settings as JSON files for future use. This functionality allows for easy reapplication of animation sequences to new spritesheets, significantly speeding up the development process when working with multiple characters or assets.
Sprite Library Asset Creation
Streamline the organization of sprites into categories and labels by creating Sprite Library assets directly from your animations. This feature organizes sprites based on animation names and frames, facilitating quick access and reuse within your projects.
USAGE OVERVIEW
1. SpriteSheet Preparation
This tool works with spritesheets, so whether you are using it for one simple spritesheet, multiple spritesheets, or a large collection of spritesheets that follow the same layout or pattern (such as for a character creator system), make sure that:
- You split your sprite sheets.
- When splitting the sheets, ensure that each frame is cropped out correctly.
2. Download the Package
- Download the package.
- With your project open, double click the package file to add it to your project.
- Once added to your project, you should be able to see it in your project via Tools/SpriterNator.
3. Adding Animation Properties
- Select the spritesheet (not the individual frame, the complete spritesheet) asset that you want to use to create animations.
- Also set the location to where your assets should save.
- If you plan on creating a Sprite Library asset from your animations, add a name for this asset.
4. Create Your Animations
- You can add animations to the list via the “+” button.
- You can remove animations from the list via the “-” button.
- You can duplicate list animations via the “++” button.
- When creating an animation, enter the first frame, last frame, and frame rate of your animation. Also state whether or not it should loop.
- You can find the first frame value on your spritesheet at the end of the frame naming “_x”.
- You can find the last frame value on your spritesheet at the end of the frame naming “_x”.
- The frame rate is added automatically, but you can change it if you want.
5. Export Your Animations
- When you’ve created your animations, and you want to export them as .anim assets, click the “CREATE ANIMATIONS” button.
- You can go to the directory where you saved it, and the animations should be there. The tool automatically focuses on this folder for you.
- Then, you can add your character to your preview panel, and test the animation.
6. Create Your Sprite Libraries
- When you’ve created your animations, and you want to export them as .asset assets, click the “CREATE SPRITE LIBRARY” button.
- Your animation names will be assigned as Categories, and your animation frames per animation will be assigned as Labels to these Categories.
- You’ll have to convert the runtime asset that it created into a library asset. Select the asset, and in the Inspector Panel, click on “Open Sprite Library Asset Upgrader”.
- Load your created library asset, and upgrade it.
- Your Sprite Library should now be created.
7. Export & Import Your Animation Lists
- If you have similar spritesheets, and you’d like to come back later to create animations for another character using the same animation frames and naming conventions, then you can save your animations as a JSON file via the “SAVE LIST” button.
- You can edit this file to add more animations, and then load it again using the “LOAD LIST” button.
8. Reuse Your Created Animations
- If you have similar spritesheets, and you want to create the same animations for Character_2 as you did for Character_1, then you can simply just drag in your new spritesheet into the properties panel, and change your naming and/or save location of the asset.
- Simply click “CREATE ANIMATIONS”, and your new character will have the same animations!
- This assumes that they have the same spritesheet and animation layout.
And there you have it! I hope this tool saves you some time when creating 2D animations and Sprite Libraries in Unity — because I know that it’s saving me time. I might add to it later on, and if so, I will update this post. Until then, happy developing! 😊