Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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-slicingLearn 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 spriteDivide a sprite into nine sections for 9-slicing, and add a collision shape.

Additional resources