//Helper function to parse the language with the IDs private void SetupLanguage(string dataString) { if (dataString == null) { Debug.LogWarning("TextAsset Doesn't exist"); return; } //Config JObject objJson = JsonConvert.DeserializeObject <JObject> (dataString); JArray dataList = new JArray(); dataList = PR_Utility.ParseArray(objJson, "Sheet1"); //Get the datas from the JSON array foreach (JObject data in dataList) { //var data = hashData as Hashtable; string strKey = ""; strKey = data["ID"].ToString(); LanguageData languageText = new LanguageData(); languageText.SetData(data); if (stringIDMap.Contains(strKey)) { Debug.LogWarning(strKey + " already in the list"); } else { stringIDMap.Add(strKey, languageText); } } }
public void SetData(JObject data) { English = PR_Utility.ParseString(data, "EN"); Indonesia = PR_Utility.ParseString(data, "INDO"); }
public void SetData(Hashtable data) { English = PR_Utility.ParseString(data, "EN"); Indonesia = PR_Utility.ParseString(data, "INDO"); }