Custom data files not copied from data folder

Monkey Forums/Monkey Programming/Custom data files not copied from data folder

Cygnus(Posted 2012) [#1]
Hi All,

Is there a way to have files in the .data folder automatically copied over to the release/debug build .data folder when you build?

My level editor creates level1.dat in the project .data folder, and release .data folder. Unfortunately, rebuilding an app clears the files out of the release .data folder, and the files in the project .data folder do not get copied over.

As a result, any level data files are not copied into the built application, which is a bit annoying to say the least :-)


Cygnus(Posted 2012) [#2]
Ignore this again- sorry!

For those who come across this looking for a solution, it is really, really simple.

If you want .dat files, for example, to be copied into your build, you need to open the config file for that build (found in the .build folder) and add the file format to the text files filter.


therevills(Posted 2012) [#3]
Or you can use the precompiler in your code:
#TEXT_FILES="*.txt|*.xml|*.json|*.tmx"|*.dat



Cygnus(Posted 2012) [#4]
Nice! Thanks- That's easier!