public bool LoadShop(Shop shop, int shopid) { try { XmlSerializer serializer = new XmlSerializer(typeof(ShopSaveData)); FileStream stream = new FileStream(Application.dataPath + shopXMLPrefix + shopid + ".xml", FileMode.Open); ShopSaveData sh = serializer.Deserialize(stream) as ShopSaveData; stream.Close(); shop.Set(sh); return true; } catch (FileNotFoundException e) { Debug.LogError(e.Message); return false; } }