I’m struggling to find a solution for this, i’m aware that in the builded game there is no “Resources” folder, but have some structures there i need to list the name of my assets
The Resources folder in the editor gets baked into a binary file in the build. There is nothing that System.IO can do to give you the data that the binary file contains. Be better to write an editor script that rounds up all the names of the files in Resources, and writes that as a text file into the Resources folder. Then you can load that text file using Resources.Load and then have all the data you need.
Are you loading prefabs, or trying to load an actual c#/js script from the resources folder? If you’re trying to load an actual script, there’s no reason to have it in the resources folder, they should be just in the scripts folder, where you’d access them through their class name, preferably in their own namespace.
Part of the problem here is your ambiguity about what you’re trying to accomplish. There may be a far better approach. For example, if you want to be able to just plug in different cars without modifying scripts, you could do what you want through serialization and loading an XML file that describes the characteristics of your different cars, rather than having a seperate script for each car.
I have my own Custom Assets generated by ScriptableObjects (a file with .asset extension)
and i just need the list to all of that files i have in my folder