public void LoadSubjectData() { string folder = Application.persistentDataPath; folder = Path.Combine(folder, data.subjectId); if (!Directory.Exists(folder)) { return; } string sessionsFile = Path.Combine(folder, "sessions.csv"); if (File.Exists(sessionsFile)) { var serializer = new CsvFormatter <SessionData>(','); FileStream stream = File.Open(sessionsFile, FileMode.Open); data.sessions = (List <SessionData>)serializer.Deserialize(stream); stream.Close(); } Debug.Log(String.Format("Loaded {0} sessions for '{1}'", data.sessions.Count, data.subjectId), this.gameObject); }