引用库:

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();

posted on 2019-12-19 10:25  MisterYang  阅读(716)  评论(0编辑  收藏  举报