기술 자료

Unity Engine

Download Unity

Unity Engine

SelectedLocale

The currently selected locale, or null when none is selected.
읽는 시간 1분최근 업데이트: 5일 전

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. Setting it before initialization finishes takes priority over the LocalizationSettings.StartupSelectors, which are then not evaluated.