Collapse Sidebar




Allows the partial display of an image in conjunction with ImageButton/ImageRectOffset. This property determines the pixel size of the image area to be displayed. If either dimension is set to 0, the entire image is displayed instead.

This property behaves identically to ImageLabel/ImageRectOffset.

Code Samples

Image ScaleType Demo

This code sample demonstrates the different ScaleType options - Stretch, Tile and Slice. It does this by resizing an ImageLabel/ImageButton in a circle.

Image Animation using Spritesheet

This code sample uses ImageRectOffset/ImageRectSize in order to play an animation of a man throwing a punch