I’m having problems to get an assetbundle, I already build it with the iPhone target so that should not be the problem.
My method looks like this
public static string AssetBundleURL
{
get
{
if (Application.platform == RuntimePlatform.WindowsWebPlayer || Application.platform == RuntimePlatform.OSXWebPlayer)
return Application.dataPath + "/assetbundles/";
else if(Application.platform == RuntimePlatform.IPhonePlayer)
return "file://" + Application.dataPath + "/Raw/assetbundles/";
else
return "file://" + Application.dataPath + "/../assetbundles/";
}
}
I start the simulation and I get the following path:
“file:///Users/dev/Library/Application Support/iPhone Simulator/5.0/Applications/E01747A0-F487-4415-825B-6095FDCBEE6E/rb.app/Data/Raw/assetbundles/ios.assetbundle”
I already checked if the file was on that path… and it’s there but for some reason www gives an error != null when I print it… then I get bad URL
Any idea?
Ther is already a question about this:
http://answers.unity3d.com/questions/163421/about-loading-assetbundle-in-iphone.html