ドキュメント

Unity Engine

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.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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