The goal here is to use sprite sheet with Unity.
The most common scenarios are:
- I already have a sprite sheets generated, how do I import the sprite sheet in Unity?
- I want to reduce de number of draws calls, should I use a spritesheet with Unity?
Import sprite sheets
Importing sprite sheet with Unity is simple, just drag and drop the sprite sheets in the resource folder.
If you need a sprite sheet you can test with this one : sonic-sprite-sheet.png
Next make sure the Sprite mode is set to Multiple :
Then you can open the Sprite Editor :
You can slice the sprites, normally you do not need to tchange the default options :
After the sprite sheet slicing, you can click on Apply to confirm the change or Revert.
After the slicing you should have :
In the resource folder you see the sprites :
Everything is done, you can now use the sprites in your game!
Reduce the number of draws calls: Sprite Atlas
If you want to reduce the number of draws calls but you have multiple sprites in your games, you can generate a sprite sheet with unity, those are call Sprite Atlas.
To create a Sprite Atlas you can do it in less than 1 minutes : Right click on you resource folder
Then you can add the sprite you want to pack in the Inspector:
You can render you Sprite Atlas with the button Pack Preview.
Unity should be able to use your Sprite Atlas you do not need to do anything else.