Automatically updates a SpriteRenderer component with a localized sprite from the LocalizationManager based on the current language.
More...
Automatically updates a SpriteRenderer component with a localized sprite from the LocalizationManager based on the current language.
This component allows runtime localization of 2D sprites in the scene, supporting both key-based and inline sprite definitions.
Usage:
- Attach this component to a GameObject with a
SpriteRenderer
.
- Set the
localizedSprite
in the Inspector (using a key or inline values).
- When the language changes, the sprite will update automatically.
Example:
- localizationKey = "characters.robot.icon"
- English: robot_icon_en.png
- Spanish: robot_icon_es.png
Notes:
- Requires a
SpriteRenderer
component.
- If the key is not found or no sprite is defined, a warning is logged.