string path="Assets";//Assets/Scenes
if(Directory.Exists(path)){
var dirctory=new DirectoryInfo(path);
var files=dirctory.GetFiles("*",SearchOption.AllDirectories);
for(int i=0;i<files.Length;i++){
if(files[i].Name.EndsWith(".meta"))continue;
if(files[i].Name.EndsWith(".unity")){
Debug.Log("name:"+files[i].Name);
}
}
}