Search directory for Files

I have a directory and need to search it for files with a particular extension. I was wondering if anyone had some good examples or tutorials on how to do this. Thanks in advance.

if you searching the outside the Assets Folder, then a C# IO tutorial is for you. there are Bazillions of them. don’t include unity in your search.


As for inside the assets folder than you can kinda forget about that. Resources.Load cannot search for a file extension, only for a type of Object e.g Material, GameObject. when you games is built for release, the file extension might as well not exsist.