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
I was trying but don't understand how the templates work Edit: I got the code to work in the actual code but not the template public bool gkd(KeyCode keycode) { return Input.GetKeyDown(keycode); } void Update() { if(gkd(KeyCode.W)) { dbug("W Pressed"); } }
– Ryebread5