- Home /
Finding resources folder on iOs
To find my resources folder and the files inside it, I can just use this in the editor ....
Application.dataPath + "/Resources/AssetBundles"
But on device I get an error ....
DirectoryNotFoundException: Directory '/var/mobile/Applications/559885A9-2182-4F8A-A7EC-33F2566858C0/candyjam.app/Data/Resources/AssetBundles' not found.
Is there another way to find the resources folder when using iOs device ?
Update : Turns out the Resource folder is not kept intact whatsoever when on iOs or Android. This becomes something you have to access through the Resource class using Resources.Load and you cannot actually get to the Files themselves at all.
I have decided to use StreamingResources instead as it keeps the folder structure + files intact.
http://docs.unity3d.com/Documentation/Manual/StreamingAssets.html
As I explained in my answer, the "Resources folder" only exists as a folder in the editor. It has nothing to do with iOS or Android. You can never access Resources as a folder, on any platform.
Answer by Eric5h5 · Jun 18, 2013 at 03:53 PM
The "Resources folder" only exists in the editor. It's not really a folder, and can't be treated as such; rather it's a file called Resources.assets.
Answer by PolyaS · Jun 18, 2013 at 03:30 PM
You folder not found because on device you not create it. If you want to use Resources you have to only put some stuff in Resources directory which can be found in Assets(if not you can just create it) and then load directly from Resource folder. For example Resources.Load("Cube") as GameObject.
In fact all sub folders of Assets called Resources will be combined and are available using Resources.Load