Unity3d 获取文件夹的图片

string path = Application.dataPath + "/Resources/**";
DirectoryInfo theFolder = new DirectoryInfo(path);
FileInfo[] fileInfo = theFolder.GetFiles("*.png", SearchOption.TopDirectoryOnly);
foreach (FileInfo f in fileInfo)
{
  string str = f.Name;
}

posted @ 2015-09-25 09:58  laugher  阅读(989)  评论(0编辑  收藏  举报