/// <summary> /// 如果训练过程中需要记录数据的话,传递的字符串应为"QTable", /// 否则传递的字符串名应为"QTableyyyyMMdd" /// </summary> public void Load(string QTableName) { if (!Directory.Exists(filePath)) { Debug.LogError("The file not be found in this path. path:" + filePath); return; } string fullFileName = filePath + QTableName + EXTENSION; StreamReader sr; sr = File.OpenText(fullFileName); string content = sr.ReadToEnd(); sr.Close(); sr.Dispose(); _table = CSVTable.CreateTable(fileName, content); }
/// <summary> /// 加载文件 /// </summary> private void Load() { if (!Directory.Exists(_loadPath)) { Debug.LogError("The file not be found in this path. path:" + _loadPath); return; } string fullFileName = _loadPath + _fileName + EXTENSION; StreamReader sr; sr = File.OpenText(fullFileName); string content = sr.ReadToEnd(); sr.Close(); sr.Dispose(); _table = CSVTable.CreateTable(_fileName, content); // 添加测试 Test(); }