private DirectorNamedColor LoadColorSkin(string path) { TextAsset textAsset = EditorGUIUtility.LoadRequired(path) as TextAsset; DirectorNamedColor result; if (textAsset != null && !string.IsNullOrEmpty(textAsset.get_text())) { result = DirectorNamedColor.CreateAndLoadFromText(textAsset.get_text()); } else { result = this.m_DefaultSkinColors; } return(result); }
private new void Awake() { // ISSUE: reference to a compiler-generated field if (SceneStartup.\u003C\u003Ef__am\u0024cache2 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer SceneStartup.\u003C\u003Ef__am\u0024cache2 = new Application.AdvertisingIdentifierCallback((object)null, __methodptr(\u003CAwake\u003Em__1DA)); } // ISSUE: reference to a compiler-generated field Application.RequestAdvertisingIdentifierAsync(SceneStartup.\u003C\u003Ef__am\u0024cache2); base.Awake(); MonoSingleton <UrlScheme> .Instance.Ensure(); MonoSingleton <PaymentManager> .Instance.Ensure(); MonoSingleton <NetworkError> .Instance.Ensure(); MonoSingleton <WatchManager> .Instance.Ensure(); Object.DontDestroyOnLoad(Object.Instantiate(Resources.Load("fillalpha"), Vector3.get_zero(), Quaternion.get_identity())); TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("appserveraddr"); if (!Object.op_Inequality((Object)textAsset, (Object)null)) { return; } Network.SetDefaultHostConfigured(textAsset.get_text()); }
public static List <string> LoadAllListTextFromList( string _assetbundleFolder, string _strLoadFile, ref List <string> lst, List <string> _OmitFolderName = null) { GlobalMethod.lstABName.Clear(); GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false); GlobalMethod.lstABName.Sort(); for (int index = 0; index < GlobalMethod.lstABName.Count; ++index) { string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index]), 2); if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight)) { if (GlobalMethod.AssetFileExist(GlobalMethod.lstABName[index], _strLoadFile, string.Empty)) { TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index], _strLoadFile, false, string.Empty); AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index], true, (string)null, false); if (!Object.op_Equality((Object)textAsset, (Object)null)) { lst.Add(textAsset.get_text()); } } } } return(lst); }
public static string LoadAllListText(List <string> _lstAssetBundleNames, string _strLoadFile) { StringBuilder stringBuilder = new StringBuilder(); for (int index1 = 0; index1 < _lstAssetBundleNames.Count; ++index1) { string[] allAssetName = AssetBundleCheck.GetAllAssetName(_lstAssetBundleNames[index1], false, (string)null, false); bool flag = false; for (int index2 = 0; index2 < allAssetName.Length; ++index2) { if (allAssetName[index2].Compare(_strLoadFile, true)) { flag = true; break; } } if (!flag) { GlobalMethod.DebugLog("[" + _lstAssetBundleNames[index1] + "][" + _strLoadFile + "]は見つかりません", 1); } else { TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(_lstAssetBundleNames[index1], _strLoadFile, false, string.Empty); AssetBundleManager.UnloadAssetBundle(_lstAssetBundleNames[index1], true, (string)null, false); if (!Object.op_Equality((Object)textAsset, (Object)null)) { stringBuilder.Append(textAsset.get_text()); } } } return(stringBuilder.ToString()); }
public static void InitSoundInfo() { TextAsset asset = Resources.Load("Default/DefaultSoundData") as TextAsset; if (asset != 0) { SecurityElement xml = XMLParser.LoadXML(asset.get_text()); if (xml != null) { Dictionary <int, Dictionary <string, string> > dictionary = XMLParser.LoadIntMap(xml, "DefaultLanguage"); foreach (KeyValuePair <int, Dictionary <string, string> > pair in dictionary) { DefaulSoundData data = new DefaulSoundData { id = pair.Key, path = pair.Value["path"] }; soundDataMap.Add(pair.Key, data); } } else { LoggerHelper.Error("Default Sound xml null.", true); } } else { LoggerHelper.Error("Default Sound textAsset null.", true); } }
public override void OnActivate(int pinID) { if (pinID != 100) { return; } if (BootLoader.BootStates == BootLoader.BootState.SUCCESS) { ((Behaviour)this).set_enabled(false); this.ActivateOutputLinks(10); } else { if (GameUtility.Config_UseDevServer.Value) { Network.SetDefaultHostConfigured(GameUtility.DevServerSetting); } else if (GameUtility.Config_UseAwsServer.Value) { Network.SetDefaultHostConfigured("https://alchemist.gu3.jp/"); } Network.Mode = Network.EConnectMode.Online; string str = "grdev"; TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("networkver"); if (Object.op_Inequality((Object)textAsset, (Object)null)) { str = textAsset.get_text(); } Network.Version = str; ((Behaviour)this).set_enabled(true); BootLoader.GscInit(); } }
private new void Awake() { // ISSUE: reference to a compiler-generated field if (SceneStartup.\u003C\u003Ef__am\u0024cache2 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer SceneStartup.\u003C\u003Ef__am\u0024cache2 = new Application.AdvertisingIdentifierCallback((object)null, __methodptr(\u003CAwake\u003Em__27D)); } // ISSUE: reference to a compiler-generated field if (!Application.RequestAdvertisingIdentifierAsync(SceneStartup.\u003C\u003Ef__am\u0024cache2)) { Debug.Log((object)"advertisingId not supported"); string device_id = Guid.NewGuid().ToString(); Debug.Log((object)device_id); GameManager.SetDeviceID(device_id); } base.Awake(); MonoSingleton <UrlScheme> .Instance.Ensure(); MonoSingleton <PaymentManager> .Instance.Ensure(); MonoSingleton <NetworkError> .Instance.Ensure(); UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object.Instantiate(Resources.Load("fillalpha"), Vector3.get_zero(), Quaternion.get_identity())); TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("appserveraddr"); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)textAsset, (UnityEngine.Object)null)) { return; } Network.SetDefaultHostConfigured(textAsset.get_text()); }
public void Init(string strResourceIndexFile, Action finished, Action fail = null) { Action action = null; if (this.m_ResourceIndexes.Count == 0) { if (action == null) { action = delegate { if (!File.Exists(SystemConfig.VersionPath)) { TextAsset asset = Resources.Load("version") as TextAsset; if (asset != null) { XMLParser.SaveText(SystemConfig.VersionPath, asset.get_text()); } } finished(); }; } DriverLib.Instance.StartCoroutine(this.ReadTxtFile(strResourceIndexFile, action, fail)); } else { finished(); } }
public void CreateTable(TextAsset placeableObjectTextAsset, TextAsset placeableMapTextAsset) { objectTable = TableUtility.CreateUIntKeyTable <PlaceableObjectData>(placeableObjectTextAsset.get_text(), PlaceableObjectData.cb, PlaceableObjectData.NT, null); objectTable.TrimExcess(); mapTable = TableUtility.CreateUIntKeyTable <PlaceableMapData>(placeableMapTextAsset.get_text(), PlaceableMapData.cb, PlaceableMapData.NT, null); mapTable.TrimExcess(); }
public void CreateTable(TextAsset csv = null) { bool flag = false; if (csv == null) { csv = Resources.Load <TextAsset>("Internal/internal__TABLE__AchievementIdTable"); } CreateTable(csv.get_text()); }
public void CreateTable(TextAsset csv = null) { bool encrypted = false; if (csv == null) { csv = Resources.Load <TextAsset>("Internal/internal__TABLE__StringTable"); encrypted = true; } CreateTable(csv.get_text(), encrypted); }
public static void loadCamera( CinemachineVirtualCamera _ctrl, string _assetbundleFolder, string _strfile, bool _isDirect = false) { if (Object.op_Equality((Object)_ctrl, (Object)null)) { return; } string text = string.Empty; if (!_isDirect) { text = GlobalMethod.LoadAllListText(_assetbundleFolder, _strfile, (List <string>)null); } else { TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(_assetbundleFolder, _strfile, false, string.Empty); AssetBundleManager.UnloadAssetBundle(_assetbundleFolder, true, (string)null, false); if (Object.op_Implicit((Object)textAsset)) { text = textAsset.get_text(); } } if (text == string.Empty) { GlobalMethod.DebugLog("cameraファイル読み込めません", 1); } else { string[][] data; GlobalMethod.GetListString(text, out data); Vector3 vector3_1; vector3_1.x = (__Null)(double)float.Parse(data[0][0]); vector3_1.y = (__Null)(double)float.Parse(data[1][0]); vector3_1.z = (__Null)(double)float.Parse(data[2][0]); Vector3 vector3_2; vector3_2.x = (__Null)(double)float.Parse(data[3][0]); vector3_2.y = (__Null)(double)float.Parse(data[4][0]); vector3_2.z = (__Null)(double)float.Parse(data[5][0]); ((CinemachineVirtualCameraBase)_ctrl).get_LookAt().set_localPosition(vector3_1); ((Component)_ctrl).get_transform().set_localPosition(Vector3.op_Addition(vector3_2, vector3_1)); float result = 0.0f; if (!float.TryParse(data[6][0], out result)) { return; } // ISSUE: cast to a reference type // ISSUE: explicit reference operation (^ (LensSettings&)ref _ctrl.m_Lens).FieldOfView = (__Null)(double)result; } }
public void LoadLocalVersion() { if (File.Exists(SystemConfig.VersionPath)) { string xml = Utils.LoadFile(SystemConfig.VersionPath); this.LocalVersion = this.GetVersionInXML(xml); TextAsset asset = Resources.Load("version") as TextAsset; if (!((asset == null) || string.IsNullOrEmpty(asset.get_text()))) { this.LocalVersion.ProgramVersionInfo = this.GetVersionInXML(asset.get_text()).ProgramVersionInfo; } LoggerHelper.Info("program version : " + this.LocalVersion.ProgramVersion + " resource version :" + this.LocalVersion.ResouceVersion, true); } else { this.LocalVersion = new VersionManagerInfo(); LoggerHelper.Info("cannot find local version,export from streaming assets", true); TextAsset asset2 = Resources.Load("version") as TextAsset; if (asset2 != null) { XMLParser.SaveText(SystemConfig.VersionPath, asset2.get_text()); } } }
public void CreateCommonResourceTable(TextAsset text_asset) { CSVReader cSVReader = new CSVReader(text_asset.get_text(), "name,useRes", true); while (cSVReader.NextLine()) { string value = string.Empty; string value2 = string.Empty; cSVReader.Pop(ref value); cSVReader.Pop(ref value2); if (value.Length > 0 && value2.Length > 0) { commonResourceTable.Add(value, value2); } } }
public bool LoadSetting(string assetBundleName, string assetName) { TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(assetBundleName, assetName, false, string.Empty); if (Object.op_Equality((Object)null, (Object)textAsset)) { Debug.LogError((object)"あってはならない"); return(false); } string[] strArray = textAsset.get_text().Replace("\r", string.Empty).Split('\n'); List <string> slist = new List <string>(); slist.AddRange((IEnumerable <string>)strArray); AssetBundleManager.UnloadAssetBundle(assetBundleName, true, (string)null, true); return(this.LoadSettingSub(slist)); }
private List <KeyValuePair <int, string> > MakeDropTable(string tablePath) { List <KeyValuePair <int, string> > keyValuePairList = new List <KeyValuePair <int, string> >(); TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>(tablePath); if (Object.op_Equality((Object)textAsset, (Object)null)) { DebugUtility.LogWarning("ドロップテーブル '" + tablePath + "' の読み込みに失敗しました。"); return(new List <KeyValuePair <int, string> >()); } string[] strArray = textAsset.get_text().Replace("\r\n", "\n").Split('\n'); string str = (string)null; foreach (string s in strArray) { int key; try { key = int.Parse(s); } catch (Exception ex) { str = s; if (s.IndexOf("\r") != -1) { str = str.Replace("\r", string.Empty); continue; } continue; } keyValuePairList.Add(new KeyValuePair <int, string>(key, str)); } string msg = string.Empty; using (List <KeyValuePair <int, string> > .Enumerator enumerator = keyValuePairList.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, string> current = enumerator.Current; msg = msg + (object)current.Key + ": " + current.Value + "\n"; } } DebugUtility.Log("# drop table #"); DebugUtility.Log(msg); DebugUtility.Log("##############"); return(keyValuePairList); }
public static void LoadXML(string fileName) { TextAsset textAsset = AssetLoader.LoadAssetNow("BT/BT" + fileName, typeof(Object)) as TextAsset; if (textAsset == null) { return; } BTNode bTNode = BTLoader.TreeLoader(textAsset.get_text()); BTLoader.container.Add(fileName, bTNode); AssetLoader.UnloadAsset("BT/BT" + fileName, null); if (bTNode == null) { Debuger.Error("创建BTree失败 " + fileName, new object[0]); } }
public static string LoadTextData(string path) { AssetList.Item itemByPath1 = AssetManager.TxtAssetList.FindItemByPath(path); if (itemByPath1 != null) { int size; IntPtr num = NativePlugin.DecompressFile(AssetDownloader.TextCachePath + itemByPath1.IDStr, out size); if (num == IntPtr.Zero) { return((string)null); } byte[] numArray = new byte[size]; Marshal.Copy(num, numArray, 0, size); NativePlugin.FreePtr(num); using (StreamReader streamReader = new StreamReader((Stream) new MemoryStream(numArray), Encoding.UTF8)) return(streamReader.ReadToEnd()); } else { AssetList.Item itemByPath2 = AssetManager.AssetList.FindItemByPath(path); if (itemByPath2 != null) { int size; IntPtr num = NativePlugin.DecompressFile(AssetDownloader.CachePath + itemByPath2.IDStr, out size); if (num == IntPtr.Zero) { return((string)null); } byte[] numArray = new byte[size]; Marshal.Copy(num, numArray, 0, size); NativePlugin.FreePtr(num); using (StreamReader streamReader = new StreamReader((Stream) new MemoryStream(numArray), Encoding.UTF8)) return(streamReader.ReadToEnd()); } else { TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>(path); if (Object.op_Inequality((Object)textAsset, (Object)null)) { return(textAsset.get_text()); } return((string)null); } } }
public override void OnActivate(int pinID) { if (pinID != 100 && pinID != 101) { return; } if (GameUtility.Config_UseDevServer.Value) { Network.SetHost(GameUtility.DevServerSetting); } else if (GameUtility.Config_UseStgServer.Value) { Network.SetHost("https://stg02-app.alcww.gumi.sg/"); } else if (GameUtility.Config_UseAwsServer.Value) { Network.SetHost("http://app.alcww.gumi.sg/"); } else { Network.ResetHost(); } if (pinID == 100) { Network.Mode = Network.EConnectMode.Online; string ver = "1512"; string os = "android"; TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("networkver"); if (Object.op_Inequality((Object)textAsset, (Object)null)) { ver = textAsset.get_text(); } Network.Version = ver; this.ExecRequest((WebAPI) new ReqCheckVersion(ver, os, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback))); ((Behaviour)this).set_enabled(true); } else { Network.Mode = Network.EConnectMode.Offline; this.ActivateOutputLinks(11); ((Behaviour)this).set_enabled(false); } }
public ArrayList GetPointDataBySceneID(int sceneID) { if (this.m_sceneBornPointData.ContainsKey(sceneID)) { return(this.m_sceneBornPointData.get_Item(sceneID)); } TextAsset textAsset = AssetManager.AssetOfNoPool.LoadAssetNowNoAB("MapPointData/pointdata_" + sceneID.ToString(), typeof(Object)) as TextAsset; if (textAsset == null) { EntityWorld.Instance.ForceOut("没有数据", string.Format("找不到 sceneID = {0} 的出生点文件", sceneID), null); } string text = textAsset.get_text(); ArrayList arrayList = (ArrayList)MiniJSON.jsonDecode(text); AssetLoader.UnloadAsset("MapPointData/pointdata_" + sceneID.ToString(), null); this.m_sceneBornPointData.Add(sceneID, arrayList); return(arrayList); }
private new void Awake() { base.Awake(); MonoSingleton <UrlScheme> .Instance.Ensure(); MonoSingleton <PaymentManager> .Instance.Ensure(); MonoSingleton <NetworkError> .Instance.Ensure(); MonoSingleton <WatchManager> .Instance.Ensure(); TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>("appserveraddr"); if (!Object.op_Inequality((Object)textAsset, (Object)null)) { return; } Network.SetDefaultHostConfigured(textAsset.get_text()); }
public static string LoadAllListText( string _assetbundleFolder, string _strLoadFile, List <string> _OmitFolderName = null) { StringBuilder stringBuilder = new StringBuilder(); GlobalMethod.lstABName.Clear(); GlobalMethod.lstABName = GlobalMethod.GetAssetBundleNameListFromPath(_assetbundleFolder, false); GlobalMethod.lstABName.Sort(); for (int index1 = 0; index1 < GlobalMethod.lstABName.Count; ++index1) { string stringRight = YS_Assist.GetStringRight(Path.GetFileNameWithoutExtension(GlobalMethod.lstABName[index1]), 2); if (_OmitFolderName == null || !_OmitFolderName.Contains(stringRight)) { string[] allAssetName = AssetBundleCheck.GetAllAssetName(GlobalMethod.lstABName[index1], false, (string)null, false); bool flag = false; for (int index2 = 0; index2 < allAssetName.Length; ++index2) { if (allAssetName[index2].Compare(_strLoadFile, true)) { flag = true; break; } } if (!flag) { GlobalMethod.DebugLog("[" + GlobalMethod.lstABName[index1] + "][" + _strLoadFile + "]は見つかりません", 1); } else { TextAsset textAsset = CommonLib.LoadAsset <TextAsset>(GlobalMethod.lstABName[index1], _strLoadFile, false, string.Empty); AssetBundleManager.UnloadAssetBundle(GlobalMethod.lstABName[index1], true, (string)null, false); if (!Object.op_Equality((Object)textAsset, (Object)null)) { stringBuilder.Append(textAsset.get_text()); } } } } return(stringBuilder.ToString()); }
private void LoadImageTable() { TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>(this.ImageTable); if (UnityEngine.Object.op_Equality((UnityEngine.Object)textAsset, (UnityEngine.Object)null)) { return; } StringReader stringReader = new StringReader(textAsset.get_text()); string str; while ((str = stringReader.ReadLine()) != null) { if (!string.IsNullOrEmpty(str)) { string[] strArray = str.Split('\t'); this.mImagePairs.Add(new KeyValuePair <string, string>(strArray[0], strArray[1])); } } }
internal void OverwriteData(TextAsset tsv) { this.OverwriteData(new StringGrid(tsv.get_name(), CsvType.Tsv, tsv.get_text())); }
public void AddTable(TextAsset textasset) { TableUtility.AddUIntKeyTable(dataTable, textasset.get_text(), Data.cb, "id,distanceHateRate,shortShortDistance,shortDistance,middleDistance,longDistance,lifeLowerImportance,lifeLownerVolatize,lifeLowerAttackedVolatize,shortShortDistanceDamage,shortDistanceDamage,middleDistanceDamage,longDistanceDamage,damageImportance,damageVolatize,damageAttackedVolatize,healImportance,healVolatize,healAttackedVolatize,skillImportance,skillVolatize,skillDamagedVolatize,skillHateParam,specialDamageImportance,specialDamageVolatize,specialDamageAttackedVolatize,weakPointHate", null); }
public void CreateTable(TextAsset textasset) { CreateTable(textasset.get_text()); }
public static string GetEventCueID(FlowNode_ShopVoice2.EType type, DateTime dt, string fileName) { int index = (int)type; int length = 3; if (index < 0 || index >= length) { return((string)null); } if (FlowNode_ShopVoice2.sDateEvent == null) { FlowNode_ShopVoice2.sDateEvent = new List <FlowNode_ShopVoice2.DateEvent> [length]; } if (FlowNode_ShopVoice2.sDateEvent == null) { return((string)null); } if (FlowNode_ShopVoice2.sDateEvent[index] == null) { FlowNode_ShopVoice2.sDateEvent[index] = new List <FlowNode_ShopVoice2.DateEvent>(); string path = fileName; string s; if (GameUtility.Config_UseAssetBundles.Value) { s = AssetManager.LoadTextData(path); } else { TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>(path); s = !Object.op_Inequality((Object)textAsset, (Object)null) ? (string)null : textAsset.get_text(); } if (string.IsNullOrEmpty(s)) { return((string)null); } using (StringReader stringReader = new StringReader(s)) { string str; while ((str = stringReader.ReadLine()) != null) { if (!string.IsNullOrEmpty(str) && !str.StartsWith(";")) { string[] strArray = str.Split('\t'); if (strArray != null && strArray.Length >= 3) { FlowNode_ShopVoice2.DateEvent dateEvent = new FlowNode_ShopVoice2.DateEvent(); if (DateTime.TryParse(strArray[0], out dateEvent.startDate) && DateTime.TryParse(strArray[1], out dateEvent.endDate)) { dateEvent.cueID = strArray[2]; FlowNode_ShopVoice2.sDateEvent[index].Add(dateEvent); } } } } } } using (List <FlowNode_ShopVoice2.DateEvent> .Enumerator enumerator = FlowNode_ShopVoice2.sDateEvent[index].GetEnumerator()) { while (enumerator.MoveNext()) { FlowNode_ShopVoice2.DateEvent current = enumerator.Current; if (current.startDate <= dt && dt <= current.endDate) { return(current.cueID); } } } return((string)null); }
public SceneData CreateSceneData(string scene_name, TextAsset text_asset) { //IL_012e: Unknown result type (might be due to invalid IL or missing references) try { CSVReader cSVReader = new CSVReader(text_asset.get_text(), "name,type,useRes,loadRes,appVer,evName,evTo,retBtn,strKey,strJP", true); SceneData sceneData = new SceneData(); sceneData.sceneName = scene_name; SectionData sectionData = null; string text = null; while (cSVReader.NextLine()) { string value = string.Empty; string value2 = string.Empty; string value3 = string.Empty; string value4 = string.Empty; string value5 = string.Empty; string value6 = string.Empty; string value7 = string.Empty; int value8 = 0; string value9 = string.Empty; string value10 = string.Empty; cSVReader.Pop(ref value); cSVReader.Pop(ref value2); cSVReader.Pop(ref value3); cSVReader.Pop(ref value4); cSVReader.Pop(ref value5); cSVReader.Pop(ref value6); cSVReader.Pop(ref value7); cSVReader.Pop(ref value8); cSVReader.Pop(ref value9); cSVReader.Pop(ref value10); if (value.Length > 0) { sectionData = new SectionData(); if (value == "SCENE") { value = scene_name + "Scene"; } sectionData.sectionName = value; if (text != null && value == text) { sectionData.isTop = true; text = null; } if (value2.Length == 0) { throw new UnityException("scene table parse error"); } sectionData.typeParams = value2.Split(new char[1] { ':' }, StringSplitOptions.RemoveEmptyEntries); try { sectionData.type = (GAME_SECTION_TYPE)(int)Enum.Parse(typeof(GAME_SECTION_TYPE), sectionData.typeParams[0]); } catch (Exception) { sectionData.type = GAME_SECTION_TYPE.COMMON_DIALOG; } sectionData.backButtonIndex = value8; sceneData.sectionList.Add(sectionData); } if (value3.Length > 0) { sectionData.useResourceList.Add(value3); } if (value4.Length > 0) { if (sectionData.preloadResourceList == null) { sectionData.preloadResourceList = new List <string>(); } sectionData.preloadResourceList.Add(value4); } if (value6.Length > 0 || value7.Length > 0) { EventData eventData = new EventData(); eventData.appVer = value5; eventData.eventName = value6; if (sectionData.type == GAME_SECTION_TYPE.SCENE && value6.Length == 0 && value7.Length > 0) { text = value7; } string[] array = value7.Split(':'); eventData.toSectionName = array[0]; eventData.closeType = UITransition.TYPE.CLOSE; eventData.openType = UITransition.TYPE.OPEN; int i = 1; for (int num = array.Length; i < num; i++) { string text2 = array[i]; if (text2.Length == 3 && text2[1] == '>') { if (text2[0] == 'c') { eventData.closeType = UITransition.GetType(text2[2]); } else if (text2[0] == 'o') { eventData.openType = UITransition.GetType(text2[2]); } } } if (sectionData.eventDataList == null) { sectionData.eventDataList = new List <EventData>(); } sectionData.eventDataList.Add(eventData); } if (value9.Length > 0 || value10.Length > 0) { TextData textData = new TextData(); textData.key = value9; textData.text = value10; if (sectionData.textList == null) { sectionData.textList = new List <TextData>(); } sectionData.textList.Add(textData); } } sceneDataTable.Add(scene_name, sceneData); return(sceneData); IL_038e: SceneData result; return(result); } catch (Exception exc) { Log.Exception(exc); return(null); IL_03a4: SceneData result; return(result); } }
private static LocalizedText.TextTable InternalLoadTable(string language, string tableID, LocalizedText.TextTable overwriteTable = null) { LocalizedText.TextTable textTable; if (overwriteTable == null) { textTable = new LocalizedText.TextTable(tableID); LocalizedText.mTables.Add(textTable); } else { textTable = overwriteTable; textTable.Items.Clear(); } string path = LocalizedText.ComposeTablePath(language, tableID); string s; if (LocalizedText.UseAssetManager) { s = AssetManager.LoadTextData(path); } else { TextAsset textAsset = (TextAsset)Resources.Load <TextAsset>(path); s = !Object.op_Inequality((Object)textAsset, (Object)null) ? (string)null : textAsset.get_text(); } if (s != null) { Debug.LogWarning((object)("SG: Loading text table '" + tableID + "'")); char[] separator = new char[1] { '\t' }; using (StringReader stringReader = new StringReader(s)) { string end = stringReader.ReadToEnd(); char[] chArray = new char[1] { '\n' }; foreach (string str in end.Split(chArray)) { if (!string.IsNullOrEmpty(str) && !str.StartsWith(";")) { string[] strArray = str.Split(separator, 2); if (strArray.Length >= 2 && !string.IsNullOrEmpty(strArray[0]) && !string.IsNullOrEmpty(strArray[1])) { textTable.Items[strArray[0]] = strArray[1].Replace("<br>", "\n"); } } } } } else { Debug.LogError((object)("Failed to load text '" + path + "'")); LocalizedText.mTables.Remove(textTable); } return(textTable); }
private bool LoadCategoryInfoList( string assetBundleName, string assetName, Dictionary <string, int> dictEnumSrc) { if (!AssetBundleCheck.IsFile(assetBundleName, assetName)) { Debug.LogError((object)("読み込みエラー\r\nassetBundleName:" + assetBundleName + "\tassetName:" + assetName)); return(false); } AssetBundleLoadAssetOperation loadAssetOperation = AssetBundleManager.LoadAsset(assetBundleName, assetName, typeof(TextAsset), (string)null); if (loadAssetOperation == null) { Debug.LogError((object)("読み込みエラー\r\nassetName:" + assetName)); return(false); } TextAsset asset = loadAssetOperation.GetAsset <TextAsset>(); if (Object.op_Equality((Object)null, (Object)asset)) { Debug.LogError((object)"ありえない"); return(false); } string[,] data; YS_Assist.GetListString(asset.get_text(), out data); int length1 = data.GetLength(0); int length2 = data.GetLength(1); this.dictCategory.Clear(); if (length1 != 0 && length2 != 0) { for (int index = 0; index < length1; ++index) { ShapeInfoBase.CategoryInfo categoryInfo = new ShapeInfoBase.CategoryInfo(); categoryInfo.Initialize(); int key = int.Parse(data[index, 0]); categoryInfo.name = data[index, 1]; int num = 0; if (!dictEnumSrc.TryGetValue(categoryInfo.name, out num)) { Debug.LogWarning((object)("SrcBone【" + categoryInfo.name + "】のIDが見つかりません")); } else { categoryInfo.id = num; categoryInfo.use[0][0] = !(data[index, 2] == "0"); categoryInfo.use[0][1] = !(data[index, 3] == "0"); categoryInfo.use[0][2] = !(data[index, 4] == "0"); if (categoryInfo.use[0][0] || categoryInfo.use[0][1] || categoryInfo.use[0][2]) { categoryInfo.getflag[0] = true; } categoryInfo.use[1][0] = !(data[index, 5] == "0"); categoryInfo.use[1][1] = !(data[index, 6] == "0"); categoryInfo.use[1][2] = !(data[index, 7] == "0"); if (categoryInfo.use[1][0] || categoryInfo.use[1][1] || categoryInfo.use[1][2]) { categoryInfo.getflag[1] = true; } categoryInfo.use[2][0] = !(data[index, 8] == "0"); categoryInfo.use[2][1] = !(data[index, 9] == "0"); categoryInfo.use[2][2] = !(data[index, 10] == "0"); if (categoryInfo.use[2][0] || categoryInfo.use[2][1] || categoryInfo.use[2][2]) { categoryInfo.getflag[2] = true; } List <ShapeInfoBase.CategoryInfo> categoryInfoList = (List <ShapeInfoBase.CategoryInfo>)null; if (!this.dictCategory.TryGetValue(key, out categoryInfoList)) { categoryInfoList = new List <ShapeInfoBase.CategoryInfo>(); this.dictCategory[key] = categoryInfoList; } categoryInfoList.Add(categoryInfo); } } } AssetBundleManager.UnloadAssetBundle(assetBundleName, true, (string)null, false); return(true); }