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:
- How to store data in Resource directory while executing app in android device.
Thanks