Scary inconsistencies with files in the Resources folder

Well this is annoying… a week before I plan to submit, this bug pops up out of nowhere. My levels are xml files stored in the resources folder. Today while testing I noticed levels 6 and 7 are the same level – I check the files to find they’re different as they’re supposed to be. I did some fiddling and more testing. Then 5 and 6 were the same when I tested on the device. Logs confirmed they were loading different files.

I seem to have fixed it by deleting (moving out) all the files in the resources folder, building, then putting them all back in and building again.

Anybody ever experience something like this? It scares me because it’s something I could easily overlook when releasing updates etc. Anyway to ensure Unity does a thorough job of translating the files in the resources folder onto the device (is what I did the only way)? It seems like it assumed some of the files were unchanged.

sounds like a “right click on resoruces - reimport all” task caused by a broken import or something alike

For XML you could use the StreamingAssets folder and then load them from outside with System.IO.File.ReadAllText for example (or whatever functionality / library you use for xml parsing which might offer a read from file)