unity editor模式下读取文件夹资源

string path = EditorUtility.OpenFolderPanel("Load png Textures", "", "");  //打开文件夹
string[] files = Directory.GetFiles(path);  //获取所有文件路径

Object[] os = new Object[] { AssetDatabase.LoadAssetAtPath(f2, typeof(UnityEngine.Sprite)) };  //load 资源

posted @ 2018-11-27 21:54  叫我张先生  阅读(4282)  评论(0编辑  收藏  举报