EasyTalk API
|
This class is used to manage font updates on Text and TextMeshPro components, such as the font size to use and the font to use for a particular language. More...
Static Public Member Functions | |
static void | UpdateFonts (Component component, LanguageFontOverride fontOverride) |
Updates the font of each text component in the specified component and its children using the specified font settings, or the component's original font if no font is available. | |
Static Private Member Functions | |
static void | HandleTextLocalizableFontCustomizations (Text text, Dictionary< int, LocalizableComponent > componentMapping, LanguageFontOverride baseSettingsFontOverride) |
Applies settings to the specified Text component based on the current language and overridden font settings, if the text component is mapped to a LocalizableComponent which overrides settings. | |
static Dictionary< int, LocalizableComponent > | GetLocalizableTextComponentMap (Component component) |
Returns a mapping of Text component instance IDs to LocalizableComponent parents of those components, where the LocalizableComponents are children of the component passed in to this method. | |
Static Private Attributes | |
static Dictionary< int, TextFontSettings > | originalFonts = new Dictionary<int, TextFontSettings>() |
A mapping of component instance IDs to the fonts which they originally used. This is used to revert components when the language is changed. | |
This class is used to manage font updates on Text and TextMeshPro components, such as the font size to use and the font to use for a particular language.
|
staticprivate |
Returns a mapping of Text component instance IDs to LocalizableComponent parents of those components, where the LocalizableComponents are children of the component passed in to this method.
component | The parent component to retrieve mappings for. |
|
staticprivate |
Applies settings to the specified Text component based on the current language and overridden font settings, if the text component is mapped to
a LocalizableComponent which overrides settings.
text | The Text component to modify. |
componentMapping | A mapping of Text component instance IDs to LocalizableComponents. If no mapping exists for the provided Text component, this method will return without making modifications. |
baseSettingsFontOverride | The LanguageFontOverride set on EasyTalk Dialogue Settings. |
|
static |
Updates the font of each text component in the specified component and its children using the specified font settings, or the component's original font if no font is available.
component | The component to update fonts on. |
fontOverride | The font override settings to use. |
|
staticprivate |
A mapping of component instance IDs to the fonts which they originally used. This is used to revert components when the language is changed.