Accessing custom resources on Android

Hi Guys

I am having issues with being able to access custom resources on Android that are outside the resources folder.

For now, I am editing my apk each time to include my custom resource files in the apk and signing it. I will later write an editor script to make sure they are copied during the build process to the right folder.
I first tried using the Application.dataPath to read my files and placed the my XML files at the root of the apk. But the application was unable to access the files in that location.

Next I tried using Application.persistentDataPath to acces my files and tried placing my XML files inside the res folder of the apk as well as the asset folder, but still the application was unable to find the files. Finally I had to check the path from which the application was trying to access the files using logcat, and placed my XML files into the folder to get my app working.

Can anyone help with figuring out where inside the apk should I be placing my files so that they are automatically copied to the folder that will be accessed by Application.persistentDataPaht? Also some easy way to be able to copy the files to that location during the build process?

Any or all help will be appreciated.

Thanks in advance
Rahul

Embed them in Assets/Plugins/Android/res. They are accessible via `getResources().getIdentifier(…)’ from Android.
Unfortunately this is now deprecated but still works.