Version: Unity 6.3 LTS (6000.3)
Language : English
Create a sprite atlas
Load sprite atlases manually at runtime

Create lower resolution versions of sprite atlases

To create lower resolution versions of the same spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
atlas for different platforms, create variant sprite atlases. A variant sprite atlasGraphics: A utility that packs several sprite textures tightly together within a single texture known as an atlas. More info. 2D: A texture that is composed of several smaller textures. Also referred to as a texture atlas, image sprite, sprite sheet or packed texture. More info.
See in Glossary
combines the same sprites and textures as the original sprite atlas, but the combined texture it creates has a lower resolution.

Follow these steps:

  1. Create a sprite atlas as normal. Make sure its Type is set to Master. This sprite atlas is the parent sprite atlas.

  2. Create another sprite atlas, then in its InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
    See in Glossary
    window set Type to Variant.

  3. In the Inspector window of the variant sprite atlas, set Master Atlas to the parent sprite atlas you created in step 1. Either drag the parent sprite atlas from the Project window, or select the picker ().

    A variant sprite atlas combines the same sprites and textures as the parent asset. It doesn’t have its own Objects for Packing list, and Unity doesn’t create a sprite atlas asset for it in the Project window.

  4. To select the size of the combined texture of the variant sprite atlas, set the Scale property. For example, set Scale to 0.5 to create a sprite atlas texture half the resolution of the parent sprite atlas.

  5. Select Pack Preview to display the packed texture in the Preview window at the bottom of the Inspector window.

Use the variant sprite atlas

By default, Unity includes both the parent sprite atlas and the variant sprite atlas in your built project. This means Unity randomly chooses which sprite atlas to render with at runtime.

To avoid this, use any of the following approaches:

  • To manually select a sprite atlas for a sprite, use the SpriteAtlas.GetSprite API.
  • To manually control which sprite atlas Unity loads and uses, refer to Load sprite atlases manually at runtime.
  • To exclude the parent sprite atlas from the build, disable Include in Build in the Inspector window of the parent sprite atlas.

Important: If you disable Include in Build for both the parent sprite atlas and the variant sprite atlas, Unity includes no textures for the sprites and textures, and the sprites that use the texture are invisible.

Additional resources

Create a sprite atlas
Load sprite atlases manually at runtime