Sprite Resolver component
The Sprite Resolver component pulls information from the Sprite Library Asset set in the Sprite Library component on the same GameObject. It automatically applies the selected Sprite to the Sprite Renderer. This allows you to swap the Sprite Renderer’s Sprite to other ones in the Sprite Library Asset during run time.
The component contains two properties - Category and Label - as well as a visual Variant Selector that displays thumbnails of the Sprites contained in the Sprite Library Asset.
Property | Function |
---|---|
Category | Select which Category you want to use a Sprite from for this GameObject. |
Label | Select the Label of the Sprite you want to use for this GameObject. |
You can select the Sprite by setting to the component to its Category and Label, or select the Sprite directly with the visual Variant Selector. When either of the Sprite Resolver’s properties change, the Sprite Resolver component checks the hierarchy for a Sprite Library component on the same GameObject. Once it finds the Sprite Library component, the Sprite Resolver requests the Sprite with the matching Category and Label values.