/// <summary> /// /// </summary> static void DrawGUI() { if (localeFiles == null) { localeFiles = DirectoryUtils.GetFileGUIDs(AssetDatabase.GUIDToAssetPath("95cedfc7731853946b0b3650f175d73a"), "*.csv"); localeFilesPopup = localeFiles.Select(x => AssetDatabase.GUIDToAssetPath(x).FileNameWithoutExtension()).ToArray(); } #if UNITY_2019_1_OR_NEWER EditorGUILayout.LabelField("Support", "2019.1 - xxx"); #elif UNITY_2018_3_OR_NEWER EditorGUILayout.LabelField("Support", "2018.3 - 2018.4"); #elif UNITY_2017_1_OR_NEWER EditorGUILayout.LabelField("Support", "2017.1 - 2018.2"); #else EditorGUILayout.LabelField("Support", "Not Support"); #endif EditorGUI.BeginChangeCheck(); int n = ArrayUtility.IndexOf(localeFiles, Pref.i.language); if (n < 0) { n = 0; } n = EditorGUILayout.Popup(S._Language, n, localeFilesPopup); if (EditorGUI.EndChangeCheck()) { Pref.i.language = localeFiles[n]; Pref.LoadLocalize(); Pref.Save(); } GUILayout.Space(8f); }
public static void Load() { if (i != null) { return; } i = EditorPrefJson <Pref> .Get(PREF_NAME); s_localizeEvent = null; LoadLocalize(); }
public static void PreferencesGUI() { #endif Pref.Load(); DrawGUI(); }
void OnEnable() { drawGUI = DrawGUI; Pref.Load(); }