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;
}
转载于:https://www.cnblogs.com/laugher/p/4837308.html