Game Development Reference
In-Depth Information
If your
Source Image
does not have a border set (a border with
dimensions | 1), then you will get a warning when setting the
Image
Type
to
Sliced
, informing you that the image cannot be used in this
mode without a border.
As you can see, the preview window shows the border positions as well as an
additional
Fill Center
option, which when checked will draw the entire image in
the
Rect Transform
with non-uniform scale; unchecking it will remove the portion
of the image within the border square.
Note: An image that has a border defined cannot be used for a
Tiled
image (see the following screenshot). Additionally, when you apply an
image with a border to an
Image
control, it will automatically default
to a
Sliced Image
type.
Tiled Images
Instead of scaling the source image, Unity also provides the option to tile an
Image
within the bounds of the GameObject's
Rect Transform
. By setting the
Image Type
option to
Tiled
, the image will then tile both horizontally and vertically from the
bottom-left point of the
Rect Transform
as shown here: