Variant Sprite Atlas
Preparing Sprite Atlases for distribution

Sprite Atlas workflow

Follow the steps below to create a Sprite Atlas:

  1. Create a Sprite Atlas Asset.
  2. Select a list of Objects for Packing into the Sprite Atlas.
  3. Enable Include in build on Sprite Atlases to include them with the project.
  4. (Optional) Create a Variant Sprite Atlas.
  5. (Optional) Prepare Sprite Atlases for distribution.
  6. Load the Sprite Atlas via Late Binding with a script.

Create a Sprite Atlas Asset

To create the Sprite Atlas Asset, go to Asset > Create > Sprite Atlas. Unity creates the Sprite Atlas in the Asset folder, with the file extension * .spriteatlas.

Selecting items for the Objects for Packing list

The Objects for Packing list displays the currently selected items that are in the Sprite Atlas. You can place Texture2D and Sprite Assets in this list. Drag and drop a folder directly onto the list to automatically add all valid content within the folder to the list (only the folder appears on the list).

To select specific items for the list:

  1. Select the Sprite Atlas Asset and find the Objects For Packing list in its Inspector window. It displays the list of items for Unity to pack when it builds the Sprite Atlas.

  2. To add items, select the plus (+) icon at the lower right of the list to create a new row. Drag a valid Asset onto an empty row to add it to the list, or select the circle icon to the right of the row to open the Select Object window. Select an Asset from the Object Picker window to add it to the list:

    To remove an item from the list, click the minus (-) icon at the lower right of the Objects For Packing list. To replace an item, drag another item to the row it occupies to replace it on the list.

  3. Select Pack Preview to preview the combined Atlas Texture in the Asset Preview window.

Include in Build

All Sprite Atlases have Include in Build enabled by default when created. This means that Unity includes the Sprite Atlases with the Project’s build and automatically loads them at the build’s run time. Enable or disable the ‘Include in Build’ property to control which Sprite Atlases are included in the Project build.

Clearing ‘Include in Build’ disables this behavior, and is done when preparing a Sprite Atlas for distribution.

Variant Sprite Atlas
Preparing Sprite Atlases for distribution