I have a set of files that I need to include into my build, and as far as I can tell, Unity doesn’t handle my use case.
Here’s my situation: I have a series of text files that describe tiles that are used in my game. The files and directories look like this:
Assets/ Resources/ Data/ tile1.let tile2.let [and so on]
At runtime, when run from the editor, I load the files from Application.dataPath, and this works fine. When built, it does not work.
The (partial) solutions I’ve considered:
Using Resource.Load() in the way describe above. This is undesirable because the .let files are generated by a different application, there are lots of them, and they change all of the time. There does not seem to be a way to create a TextAsset unless it has a .txt extension, right?
Using a postbuild step to copy the necessary files over into the data directory. Evidently, there used to be a feature for this (from this question), but the links are now broken, and I can’t figure out the replacement. Besides, does this work in Unity Cloud build (which I use)?
Loading the files at first run from a server, and writing them into dataPath, or someplace similar. Really? Do I really need to resort to this?
This seems like standard blocking and tackling to me. Is there not a better way?