public IEnumerator Load() { //加载DLC 的 Language foreach (var dlc in DLCManager.LoadedDLCItems.Values) { if (DLCConfig.Ins.IsEditorOrConfigMode) { string[] fileList = dlc.GetAllLanguages(); foreach (var item in fileList) { LoadLanguageData(File.ReadAllBytes(item)); yield return(new WaitForEndOfFrame()); } } else { var assetBundle = DLCManager.LoadRawBundle(Const.BN_Language, dlc); if (assetBundle != null) { foreach (var txt in assetBundle.LoadAllAssets <TextAsset>()) { LoadLanguageData(txt.bytes); yield return(new WaitForEndOfFrame()); } } } } OnAddDynamicDic(); yield break; }
public IEnumerator Load() { Callback_OnParseStart?.Invoke(); //加载DLC Lua foreach (var dlc in DLCManager.LoadedDLCItems.Values) { if (DLCConfig.Ins.IsEditorOrConfigMode) { var files = dlc.GetAllLuas(); for (int i = 0; i < files.Length; ++i) { DoString(File.ReadAllText(files[i]), files[i]); BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Lua " + files[i]; } } else { var assetBundle = DLCManager.LoadRawBundle(Const.BN_Lua, dlc); if (assetBundle != null) { foreach (var lua in assetBundle.LoadAllAssets <TextAsset>()) { DoString(lua.text, lua.name); BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Lua " + lua.name; } } } yield return(new WaitForEndOfFrame()); } Callback_OnParseEnd?.Invoke(); yield break; }
public IEnumerator Load() { Callback_OnParseStart?.Invoke(); Data.Clear(); foreach (var dlc in DLCManager.LoadedDLCItems.Values) { if (DLCConfig.Ins.IsEditorOrConfigMode) { foreach (var file in dlc.GetAllTexts()) { string fileName = Path.GetFileName(file); Data.Add(fileName, File.ReadAllText(file)); BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Text " + fileName; yield return(new WaitForEndOfFrame()); } } else { var assetBundle = DLCManager.LoadRawBundle(Const.BN_Text, dlc); if (assetBundle != null) { foreach (var textAssets in assetBundle.LoadAllAssets <TextAsset>()) { Data.Add(textAssets.name, File.ReadAllText(textAssets.text)); BaseGlobal.LoaderMgr.ExtraLoadInfo = "Load Text " + textAssets.name; } } } } Callback_OnParseEnd?.Invoke(); yield break; }
public IEnumerator Load() { Callback_OnParseStart?.Invoke(); //加载DLC Excel foreach (var dlc in DLCManager.LoadedDLCItems.Values) { if (DLCConfig.Ins.IsEditorOrConfigMode) { string[] fileList = dlc.GetAllExcel(); foreach (var item in fileList) { LoadExcelData(File.ReadAllBytes(item), Path.GetFileNameWithoutExtension(item)); yield return(new WaitForEndOfFrame()); } } else { var assetBundle = DLCManager.LoadRawBundle(Const.BN_Excel, dlc); if (assetBundle != null) { foreach (var txt in assetBundle.LoadAllAssets <TextAsset>()) { LoadExcelData(txt.bytes, txt.name); yield return(new WaitForEndOfFrame()); } } } yield return(new WaitForEndOfFrame()); } Callback_OnParseEnd?.Invoke(); yield break; }