StreamingAssets with OSX


Something very strange is happening to me. I am creating an OSX app, building the player and then executing it on the MAC. Everything works fine: I can see all the Streaming Assets (some textures). However when I create a .pkg of this .app and install it as an Application, I execute it and the Streaming Assets are not being found. I activated the Logs and what I get is this error: Couldn’t open file /Applications/ The path is perfectly well so I do not get why is this not working. The code related to this is the following:

string sFinalPath = "file://" + Application.streamingAssetsPath + "/" + sTexturePath + sTextureName + ".png";
m_WWWLoader = new WWW(sFinalPath);

yield return m_WWWLoader;

if (m_WWWLoader.isDone)
   Debug.Log("============> Loader done with error (" + m_WWWLoader.error + ")");

If anyone knows what is going on please tell me :slight_smile:

Thanks in advance!

[SOLVED] I resolved this using Resources.Load instead of WWW.

For OSX it’s actually listed under .app/Contents/Data/Resources/StreamingAssets/
Not sure when Unity is going to fix that.