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.
Read time 1 minuteLast updated 12 days ago
Set up sprites such as walls or floors so they stretch or repeat when you resize them, and you don't need to create multiple sprites for different sizes.
This technique is known as 9-slicing, because it involves dividing a sprite into nine sections.
Topic | Description |
|---|---|
| 9-slicing | Learn about creating a sprite with nine sections, so the sections stretch or repeat in different ways to keep the sprite in proportion. |
| 9-slice a sprite | Divide a sprite into nine sections for 9-slicing, and add a collision shape. |
Additional resources
- Tilemaps
- Rule tiles in the 2D Tilemap Extras package
- Using 9-Slicing for Scalable Sprites on the Unity Learn site.