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 资源

猜你喜欢

转载自www.cnblogs.com/unityzc/p/10029301.html