Skip to Content
Mastering UI Development with Unity
book

Mastering UI Development with Unity

by Dr. Ashley Godbold
April 2018
Beginner content levelBeginner
468 pages
11h 7m
English
Packt Publishing
Content preview from Mastering UI Development with Unity

Sliced

Sliced Images are split into nine areas. When a Sliced image is scaled, all areas of the image are scaled, except the corners. This allows you to scale an image without distorting its corners. This works particularly well with sprites that have rounded corners that you want to be able to stretch into rounded rectangles. In the following image, the first shape represents the original image's proportions, the second shows the shape scaled horizontally with an Image Type of Simple, and the bottom shape is set to Sliced. The Sliced rounded rectangle has maintained its rounded edges, whereas the Simple one has become distorted. Note that Preserve Aspect Ratio is not selected on either of the scaled images.

Sliced Image Type Example in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

Jiadong Chen
Unity UI Cookbook

Unity UI Cookbook

Francesco Sapio

Publisher Resources

ISBN: 9781787125520Supplemental Content