The Sprite Extractor Tool allows you to extract individual or all the sprites from one or more larger spritesheets.
This version of the tool has been updated to use ISpriteEditorDataProvider to extract sprites from a spritesheet.
I have included the old version of the tool in the repository, but it is no longer supported in newer versions of Unity.
For those using older versions of Unity, you can find the old version of the tool as a package in the project.
Make sure you have the Unity Sprite Editor package installed that comes with the Unity 2D Packages.
To setup your spritesheet correctly you need to apply some of the following changes.
Changes that are denoted with an asterisk (*) are required!
- Multiple
- To Allow White Space set Mesh Type to Full Rect.
- To Remove White Space set Mesh Type to Tight.
- Click Sprite Editor
- Slice your Spritesheet Manually by selecting regions you wish to extract
- Slice your Spritesheet Automatically by either
- Using the Automatic option - Unity automatically finds individual sprites in the spritesheet (may not work as desired)
- Using the Cell Size of the individual Sprites
- Using the Number of Columns and Rows the Spritesheet is made up of
- Apply any padding and offsets that you may require
- Click Apply once you are done!
Once this is done, you can use either the Sprite Extractor Tool or Quick Extraction to Extract the Sprites.
- Find your Spritesheet
- Right Click on your Spritesheet
- Navigate to Assets/Extract/Sprites
- Extract All Sprites
- Extracts all the Sliced Sprites
- Extract Selected Sprites
- Select and Extract one or more Sprites from the Source Spritesheet
- Extract All Sprites
- Choose your extraction method
- Done!
Sprite Extractor Tool now has an additional Tool for GIF Frame extraction.
To install the GIF Extractor Tool, you need to install the GIF Extractor Package that is included in the project.
The GIF Extractor requires your Unity project to be set to .Net Framework.
You can change this in the Player Settings under Other Settings -> Configuration -> Scripting Runtime Version.
To use the GIF extractor all you need to do is the following:
- Find your GIF
- Right Click on your GIF
- Navigate to Extract/GIF/
- Extract Here
- Extracts all the GIF Frames to the same folder as the GIF
- Extract to Folder
- Extracts all the GIF Frames to a folder of your choice
- Extract Here
- Done!