ImageRectOffset/Size does not work with Tile ScaleType

I am using a spritesheet to pack lots of different icons together, and I want to display one of these icons tiled on an ImageLabel using ImageLabel.ScaleType = Enum.ScaleType.Tile. This doesn’t appear to be working correctly though because only a single instance of the icon is displayed and it is stretched (and is not matching the ImageLabel.TileSize property).
image

The properties window also prevents the ImageRectOffset/Size properties from being modified and shows a warning.

The ImageRectOffset/Size and ScaleType properties should have no effect on each other from my perspective as a developer; the ImageRectOffset/Size properties get applied first (to decide which part of the spritesheet to use) and the ScaleType property last (to decide how to stretch the rendered image). All the other ScaleTypes work fine, it’s just the Tile ScaleType that doesn’t play nicely.

3 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

Hi @EmeraldSlash I believe this is as-designed - spritesheets are not supported for tiled scaletypes as we rely on UV wrapping for repeating the texture (tiling) rather than repeating a specific part of the texture (like in a spritesheet).

Please create an engine feature request for this behavior and link the created request to this post:

Thanks!

2 Likes