How to store data in Resources folder of my app

Hi,

In my project I’m building an app for android based on unity.
One part of my project, I have to save a file in ‘Resource’ folder and after that I have to access the file from resource folder.
I am able to access that file from ‘Resource’ folder using

Object modelObjectPrefab = Resources.Load(“Models/modelFile”, typeof(GameObject));.
where ‘Models’ is a sub-folder in ‘Resource’ directory and ‘modelFile’ is the file name.

But, I’m unable to store files in ‘Resource’ directory. I have tried by using StreamWriter, but it suggest that file path is not exists.
I used following method to get ‘Resources’ directory.
string resourcePath = Application.persistentDataPath + “/Resources/Models”;.

And app suggest that ‘resourcePath’ does not exists.

Please help me to resolve the issue:

  1. How to store data in Resource directory while executing app in android device.

Thanks

There is no Resources folder you can write to in a build (see this question). You have to use a different folder on your device for saving files. You could create a Resources folder in Application.persistantDataPath and save your files there at runtime, but you won’t be able to load them via Resources.Load