SelectedLocale
The currently selected locale, or null when none is selected.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Property
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
public static Locale SelectedLocale { get; set; }
Remarks
Reading this returns the active locale, falling back to LocalizationSettings.ProjectLocale when no explicit selection has been made. Setting it changes the locale and raises LocalizationSettings.SelectedLocaleChanged. The value is stored as a locale code, so the assigned locale should be one of the LocalizationSettings.AvailableLocales.