Return Folder Name?
Hello,
I'm currently making a UI for a vehicle selection scene. I've categorized everything by Make, Year, Model. The way it works is that the user selects a make(Mazda, Nissan, Honda...) and the script then looks in that Make folder and lists all the years with an "active.txt" file embedded and creates a button for that particular year. The next step would be to have the user select the year and the script would return all the Models of that year for that make.
But I seem to have troubles figuring out how I can get the script to read the Folder Names and return it to me, I've tried looking around to no avail.
Any insight would be great, cheers.
Answer by jgodfrey · May 22, 2016 at 06:55 PM
You probably want to take a look at some of the standard .NET System.IO classes. Specifically, to return the sub-folders in a specified folder, take a look at:
Also, depending on your other path / directory / file needs, you might find some intersting things in any/all of:
Won't these functions become broken after a build though?
That probably depends on your build target. Since you haven't specified that, I can't say.
$$anonymous$$y apologies, I was looking to build for WebGL, and most likely iOS and Android. Is there maybe a "Resources." based pipeline I can work with as opposed to one involving directories that you would know of?