Optional
options: Partial<SpriteRendererOptions>Flip the image horizontally
Flip the image vertically
Overwrite the original image height
The image to render
The render layer
Define a mask color for the image
Define the opacity of the mask color between 1 and 0
X-axis and Y-axis offset
Change the opacity between 1 and 0
Image rotation in radians
Scale the image based on a vector
Optional
sliceCut the image based on straight coordinates starting from the top left downward
TRUE for smooth pixels (not recommended for pixel art)
Enable tiled draw mode
Define a color for tinting the sprite image
Overwrite the original image width
The SpriteRenderer component renders 2D images (sprites) to the screen.
It supports features like image slicing, scaling, rotation, flipping, opacity, color masking and tinting.
Images can be rendered with custom dimensions, positioned with offsets, and even tiled across an area.
The component allows control over pixel smoothing and can be assigned to specific render layers.
Example