public void SaveData(InventoryManager inventory, EquipmentManager equip) { SaveInvenstr = ""; SaveEquipstr = ""; GameObject[,] Saveinven = inventory.GetInventory(); for (int i = 0; i < inventory.row; ++i) { for (int j = 0; j < inventory.column; ++j) { if (Saveinven[i, j] != null) { Item item = Saveinven[i, j].GetComponent <Item>(); SaveInvenstr += string.Format("{0},{1},{2}|", item.ItemName, i, j); } else { SaveInvenstr += string.Format("null,{0},{1}|", i, j); } } } SaveInvenstr = SaveInvenstr.Substring(0, SaveInvenstr.Length - 1); Dictionary <string, GameObject> SaveEquip = equip.GetEquip(); foreach (var tem in SaveEquip) { if (tem.Value != null) { Item item = tem.Value.GetComponent <Item>(); SaveEquipstr += string.Format("{0},{1}|", item.ItemName, tem.Key); } else { SaveEquipstr += string.Format("null,{0}|", tem.Key); } } SaveEquipstr = SaveEquipstr.Substring(0, SaveEquipstr.Length - 1); Debug.LogFormat("확인값 : {0}", SaveInvenstr); Debug.LogFormat("확인값 : {0}", SaveEquipstr); }