- Home /
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.
Answer by Fornoreason1000 · Sep 18, 2016 at 06:48 AM
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.
Thanks @Fornoreason1000, this one in particular fit my needs:
http://stackoverflow.com/questions/3152157/find-a-file-with-a-certain-extension-in-folder
Just in case anyone is interested.