// ファイルで出力 private void OutputFile() { string path = parent.OutputFilePath(); if (path == null) { EditorUtility.DisplayDialog("MapCreater", "保存名を入力してください", "ok"); return; } FileInfo fileInfo = new FileInfo(path + "_terra.csv"); fileInfo.Delete(); StreamWriter sw = fileInfo.AppendText(); sw.WriteLine(GetMapTerraFormat()); sw.Flush(); sw.Close(); fileInfo = new FileInfo(path + "_obj.csv"); fileInfo.Delete(); sw = fileInfo.AppendText(); sw.WriteLine(GetMapObjFormat()); sw.Flush(); sw.Close(); // 完了ポップアップ EditorUtility.DisplayDialog("MapCreater", "output file success\n" + path, "ok"); }
// ファイルで出力 private void OutputFile() { string path = parent.OutputFilePath(); FileInfo fileInfo = new FileInfo(path); StreamWriter sw = fileInfo.AppendText(); sw.WriteLine(GetMapStrFormat()); sw.Flush(); sw.Close(); // 完了ポップアップ EditorUtility.DisplayDialog("MapCreater", "output file success\n" + path, "ok"); }