void Read() { string readPath = Application.dataPath + "/Resources/" + ((CardDataMaker)target).fileName + ".xml"; CardDataCollection dataCollection = CardDataCollection.Load(readPath); Debug.Log("Card Data Xml read from: " + readPath); ((CardDataMaker)target).cardData = dataCollection.data; }
public void LoadData(string path) { try { string readPath = System.Environment.ExpandEnvironmentVariables("%USERPROFILE%\\Documents\\" + fileName + ".xml"); CardDataCollection dataCollection = CardDataCollection.Load(path); Debug.Log("Card Data Xml read from: " + path); cardData = dataCollection.data; } catch (Exception e) { CardMakerUIManager.Instance.UpdateMessage("File not found"); } }