Loading lessons...
Sprite Shape & Atlasing
Sprite Shape & Atlasing
To build performant and visually rich 2D worlds, you must optimize how textures are packed and drawn on the screen.
Sprite Atlases
A Sprite Atlas compiles multiple individual texture images into a single large texture sheet:
- Draw Call Batching: Rendering separate sprites normally requires a draw call for each texture. Combining them into an atlas allows Unity to draw them in a single batch, greatly improving GPU performance.
- SpriteAtlasManager: You can dynamically load and unpack sprite atlases at runtime using the
SpriteAtlasManager.atlasRequesteddelegate to save memory.
Sprite Shape Controller
The Sprite Shape system allows you to create curved, organic 2D vector shapes that automatically tile and stitch sprite textures:
- Sprite Shape Profile: An asset defining which sprites map to corners, edges, or the fill area of the vector path.
- Sprite Shape Controller component: Attached to a GameObject, this lets you edit nodes in the Scene view to deform the spline path, dynamically generating meshes.
TL;DR
- Sprite Atlases pack multiple sprite assets into a single layout to reduce draw calls.
- Use SpriteAtlasManager to control dynamic atlas loading.
- Sprite Shape dynamically deforms textures along vector node paths.
- Create Sprite Shape Profiles to specify corner, edge, and fill textures.