How could I deploy a XML file to Mobile Platforms' Application.persistentDataPath?

Hello guys.
I used XML to store item data in my game as a database.
At the beginning, I tried to use “Application.dataPath”. However, it behaves differently among platforms.(e.g. It points to a compressed apk file on Android.)

Then I got “Application.persistentDataPath” which seems to be a location to store config files.

The problem is that the files in Application.persistentDataPath are not automatically deployed with the project to other platforms.

Where should I store these database like files which will be deployed with the project to any platform and are able to be accessed through the same script?

Thank you.:grin:

Oh, I solved this problem myself.
The solution:
Put the database file into the “Resources” folder. And access it using Resources.Load

If you want this database to be modified later, you can do the following
While the first time running, copy the database to Application.persistentDataPath so it would be flexible for us to modify it later.
:slight_smile: Hopefully, it would help someone. Thanks.

Awesome, thanks Parthas! I was wondering the same thing, and it’s good to hear that you figured it out. That’s the path I think I’m going to take for data storage in my game as well.