PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

ImageRectSize

ImageLabel

Vector2

Allows the partial display of an image in conjunction with ImageLabel/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 ImageButton/ImageRectOffset.


Code Samples


Image Animation using Spritesheet

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


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.