- Home /
Question by
Clarified · Oct 06, 2016 at 07:55 AM ·
iosmobileapplicationstreamingassetsdatapath
Application.dataPath + "/Raw" not loading texture on iOS?
We've managed to build our app on Android without issues and accessing textures from the StreamingAssets path using:
"jar:file://" + Application.dataPath + "!/assets/" + path;
However, on iOS, according to Unity Manual, the path to access StreamingAssets should be:
Application.dataPath + "/Raw" + path;
We've tried several ways of using that path:
WWW request = new WWW("file://" + Application.dataPath + "/Raw/" + path);
while (!request.isDone) { }
texture = request.textureNonReadable as Texture2D;
return texture;
//or
WWW request = new WWW(Application.dataPath + "/Raw/" + path);
while (!request.isDone) { }
texture = request.textureNonReadable as Texture2D;
return texture;
//or
WWW request = new WWW(Application.dataPath + "/Raw/StreamingAssets/" + path);
while (!request.isDone) { }
texture = request.textureNonReadable as Texture2D;
return texture;
//or
WWW request = new WWW("file://" + Application.dataPath + "/Raw/StreamingAssets/" + path);
while (!request.isDone) { }
texture = request.textureNonReadable as Texture2D;
return texture;
But none of them are able to load the textures we need. We are using Unity Cloud Build to build for iOS.
Help would be greatly appreciated.
Comment