Class PlayerPrefLocaleSelector
Uses the Player Prefs to keep track of the last used locale. Whenever the locale is changed, the new Locale is recorded in the Player prefs.
Namespace: UnityEngine.Localization.Settings
Assembly: Unity.Localization.dll
Syntax
[Serializable]
public class PlayerPrefLocaleSelector : IStartupLocaleSelector, IInitialize
Properties
Name | Description |
---|---|
PlayerPreferenceKey | The Player Pref key to use. |
Methods
Name | Description |
---|---|
GetStartupLocale(ILocalesProvider) | Returns the last locale set or null if no value has been recorded yet. |
PostInitialization(LocalizationSettings) | Registers a callback to SelectedLocaleChanged in order to save changes made to the Locale. |