public void ParsingData(InventoryManager inventory, EquipmentManager equip) { if (SaveInvenstr == "" || SaveEquipstr == "") { return; } inventory.ClearInventory(); equip.ClearEquipment(); // 인벤토리 로드... string[] valarr = SaveInvenstr.Split('|'); foreach (var item in valarr) { // parsingArr[0] = name [1] = y [2] = x string[] parsingArr = item.Split(','); if (parsingArr[0] != "null") { GameObject gameObject = null; for (int i = 0; i < itemoffsetList.Count; ++i) { if (parsingArr[0] == itemoffsetList[i].ItemName) { gameObject = CreateItemObject(itemoffsetList[i]); } } if (gameObject != null) { inventory.SettingInventoryItemSize(gameObject, int.Parse(parsingArr[1]), int.Parse(parsingArr[2])); } } } // 장비창 로드... string[] valarr2 = SaveEquipstr.Split('|'); foreach (var item in valarr2) { string[] parsingArr = item.Split(','); if (parsingArr[0] != "null") { GameObject gameObject = null; for (int i = 0; i < itemoffsetList.Count; ++i) { if (parsingArr[0] == itemoffsetList[i].ItemName) { gameObject = CreateItemObject(itemoffsetList[i]); } } GameObject slot = equip.GetEquipSlot(parsingArr[1]); if (gameObject && slot) { equip.EquipItem(gameObject, slot); } } } }