Version: 2022.3
Language : English
Methods of distribution
Resolving different Sprite Atlas scenarios

Late Binding

Late Binding is the name of a process in which you load or swap in the desired Sprite AtlasA 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
at runtime via the Sprite Atlas API. This is necessary when the build doesn’t automatically load a prepared 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 at runtime. This can occur when Include in Build is disabled which causes Unity to pack a Sprite Atlas in a project’s asset folder but not automatically load it or include it in the project’s published build.

Sprites enumeration at runtime

To retrieve the contents of a Sprite Atlas at runtime, follow these steps:

  1. Create a custom component that takes SpriteAtlas as a public variable.
  2. Assign a Sprite Atlas to the field.
  3. Enter the Editor’s Play mode.
  4. Access the variable and call the property GetSprites to retrieve the array of sprites packed in the selected Atlas.

Additional resources

Methods of distribution
Resolving different Sprite Atlas scenarios