Version: 2023.2
Language : English
Sprite Atlas workflow
Methods of distribution

Preparing Sprite Atlases for distribution

Ensure that the source Texture of the 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
is always uncompressed. While packing Sprite AtlasA utility that packs several sprite textures tightly together within a single texture known as an atlas. More info
See in Glossary
, pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
data is read from the source texture and if it uses any compressed format, it may result in loss of precision as it must be uncompressed first before packing. If a Sprite is packed to a Sprite Atlas, only the Sprite Atlas Texture needs to be compressed.

A Project can have multiple Sprite Atlases for different purposes (for example, Variant Atlases with lower-resolution Textures for hardware with different limitations). If you enable all available Sprite Atlases, you might encounter conflicts (refer to Resolving different Sprite Atlas scenarios for more information).

To prevent these issues, properly prepare Sprite Atlases for distribution with the following steps:

  1. Disable ‘Include in Build’ in the Sprite Atlas properties.
  2. Choose a method to distribute the Atlas.
  3. Load the Atlas via Late Binding with a script.

Disable ‘Include in Build’

Unity includes Sprite Atlases in a Project’s build by default, and automatically loads them at run time. Clear the Include in Build setting of the selected Sprite Atlas to disable this behavior.

If ‘Include in Build’ is disabled, Unity still packs the Sprite Atlas into a *.spriteatlas file in the Project’s Assets folder. However, Sprites which reference Textures in an disabled Sprite Atlas appear invisible as the reference Texture is not available or loaded. Unity does not include the disabled Sprite Atlas in the Project’s published build, and does not automatically load it at run time. To do so, a script is required to load the Sprite Atlas via Late Binding.

Sprite Atlas workflow
Methods of distribution
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961