Backbone - Localization
 
Loading...
Searching...
No Matches
Backbone::LocalizedSpritesData Class Reference

ScriptableObject that stores a list of localized sprite entries. More...

Inheritance diagram for Backbone::LocalizedSpritesData:

Public Attributes

List< LocalizedSpriteEntry > entries = new List<LocalizedSpriteEntry>()
 List of sprite entries indexed by unique key.
 

Detailed Description

ScriptableObject that stores a list of localized sprite entries.

Each entry maps a unique key to a LocalizedSprite, which contains language-specific sprite assignments. These can be defined inline or resolved via key.

This asset is used by the LocalizationManager to retrieve sprites based on language and key.

Example usage:

  1. Create a new asset via the Unity menu: Assets > Create > Localization > Localized Sprites Data
  2. Add entries such as:
    • Key: "ui.icon.warning"
    • Localized Sprite values: Set sprites for "English", "Spanish", etc.
  3. Use the key in a localized component like: LocalizedImage.localizationKey = "ui.icon.warning";

When the language is changed via LocalizationManager.SetLanguage(), the correct sprite will be resolved automatically.

Member Data Documentation

◆ entries

List<LocalizedSpriteEntry> Backbone::LocalizedSpritesData::entries = new List<LocalizedSpriteEntry>()

List of sprite entries indexed by unique key.


The documentation for this class was generated from the following file: