I use Resources.LoadAll(path) to load all items in the folder and subfolders.
After I do this I would like to get the subfolder’s name of the objects, or the complete path like I see in the editor. Is this possible?
And don’t suggest AssetDatabase, because it is an editor class, and I need it in my build.
Also if others are looking for something temporary, I was able to put my files into the StreamingAssets folder and get their path…
var filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "MyFile");
Note that this doesn’t work for all platforms, but I was able to use it on iOS for temporary storage of test files. You may be able to rework this for production.
Alternatively, for GameObjects you can create a component that identify when a object is in resources and its path. Next you create a Editor script to update all paths.