void LoadItem(string filename) { string jsontxt = System.Text.Encoding.UTF8.GetString(System.IO.File.ReadAllBytes(filename)); MyJson.JsonNode_Array array = MyJson.Parse(jsontxt) as MyJson.JsonNode_Array; Dictionary <string, byte[]> bufs = new Dictionary <string, byte[]>(); foreach (MyJson.JsonNode_Object indexitem in array) { string name = indexitem["Name"].AsString(); int len = indexitem["Length"].AsInt(); bufs[System.IO.Path.GetFileName(name)] = System.IO.File.ReadAllBytes(exportPath + "/" + name); //Debug.Log(name); } nodeParser.nodeParser np = new nodeParser.nodeParser(); np.SetBufs(bufs); np.GenNode(); }
void LoadItem(string filename) { string jsontxt = System.Text.Encoding.UTF8.GetString(System.IO.File.ReadAllBytes(filename)); MyJson.JsonNode_Array array = MyJson.Parse(jsontxt) as MyJson.JsonNode_Array; Dictionary<string, byte[]> bufs = new Dictionary<string, byte[]>(); foreach (MyJson.JsonNode_Object indexitem in array) { string name = indexitem["Name"].AsString(); int len = indexitem["Length"].AsInt(); bufs[System.IO.Path.GetFileName(name)] = System.IO.File.ReadAllBytes(exportPath + "/" + name); //Debug.Log(name); } nodeParser.nodeParser np = new nodeParser.nodeParser(); np.SetBufs(bufs); np.GenNode(); }