protected internal override void OnEnter(IFsm <IProcedureManager> procedureOwner) { base.OnEnter(procedureOwner); // 加载框架Event组件 EventComponent Event = UnityGameFramework.Runtime.GameEntry.GetComponent <EventComponent>(); SettingComponent Setting = UnityGameFramework.Runtime.GameEntry.GetComponent <SettingComponent>(); // 加载框架Event组件 localizationComponent = UnityGameFramework.Runtime.GameEntry.GetComponent <LocalizationComponent>(); //// 订阅UI加载成功事件 Event.Subscribe(LoadDictionarySuccessEventArgs.EventId, OnLoadDictionarySuccess); Language language = localizationComponent.Language; Log.Info(language); string languageString = Setting.GetString(Constant.Setting.Language); if (!string.IsNullOrEmpty(languageString)) { try { language = (Language)Enum.Parse(typeof(Language), languageString); } catch { } } if (language != Language.English && language != Language.ChineseSimplified && language != Language.ChineseTraditional && language != Language.Korean) { // 若是暂不支持的语言,则使用英语 language = Language.English; Setting.SetString(Constant.Setting.Language, language.ToString()); Setting.Save(); } localizationComponent.Language = language; Log.Info(language); localizationComponent.LoadDictionary("Default", LoadType.Text, this); }