Sprites
Use Sprites within your 2D game.
Read time 2 minutesLast updated 7 days ago
Sprites are a type of 2D asset you can use in your Unity project. Use this section to learn how to set up your sprites and manage them with different components.
If you're used to working in 3D, sprites are similar to standard textures, but there are special techniques to combine and manage sprite textures for efficiency during development.
Topic | Description |
|---|---|
| Add placeholder sprites | To quickly test sprites, create temporary placeholder sprites. A placeholder sprite is a simple white shape, for example a triangle, a square, or a capsule. |
| Import a sprite or spritesheet texture | Import an image and use it as a sprite or set of sprites in a 2D scene. |
| Cut out sprites from a texture | To create sprites from a texture, use the default Sprite Editor tab of the Sprite Editor window. |
| Crop a sprite | Remove transparent pixels from a sprite or crop the sprite to a custom shape. |
| Create collision shapes for a sprite | Generate or create the shapes that Unity uses to determine if a sprite collides with other sprites. |
| Sorting sprites | Control the order of sprites with sorting layers, sorting groups, and distance calculations. |
| Scaling sprites dynamically using 9-slicing | Set up sprites so they stretch or repeat when you resize them, so you don't need to create multiple sprites for different sizes. |
| Masking sprites | Hide or reveal parts of a sprite or a group of sprites. |
| Packing sprites into a sprite atlas | Optimize the performance of your project by combining multiple textures into a single texture. |
| Sprite asset reference | Explore the properties of a sprite asset. |
| Sprite Renderer component reference | Explore the properties you can use to customize how Unity renders a sprite in the scene. |
| Sprite Editor window reference | Explore the properties and settings you use to create sprites from a texture, edit its meshes, and rig a sprite for animation. |
| 2D Profiler module reference | Explore the properties and settings of the 2D module in the Profiler window. |