引用库:
using UnityEditor;
using System.IO;
方法函数:
AssetDatabase.Refresh();
Directory.CreateDirectory(TableReaderFolder);
using (StreamWriter writer = File.CreateText(TableReaderFolder + "/"+gameObject.name+".csv"))
{
string csStr = "障碍物ID,x坐标,z坐标\n87,5,6";
writer.Write(csStr);
}
AssetDatabase.Refresh();