Component:SpriteProvider

From Resonite Wiki
Revision as of 18:18, 21 March 2024 by 989onan (talk | contribs) (info, still a stub though)
Component image 
SpriteProvider component as seen in the Scene Inspector


Introduction

A SpriteProvider component provides a Sprite for an Image. This can be used to display graphics and produce backgrounds.

Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
HighPriorityIntegration Bool
Texture ITexture2D The sprite to provide.
Rect Rect The rectangle within the sprite to render. Note that the second x and y are actually the width and height of the Rect. The values are proportions of the width and height of the image in the Texture property.
Borders Float4
Scale Float
FixedSize Float

Behavior

Sprite providers due to the current Unity implementation at the time of writing this have issues with switching images very quickly. They will often flash white, causing a health hazard to photo sensitive users. Having all the sprites on UIX elements at once and switching their OrderOffset to change which element renders on top will remove the flashing and is currently the only way to combat this issue.

Examples

ProbablePrime's video on Sprites

Related Components