I can’t figure out why WWW.LoadFromCacheOrDownload is not working. Here is simple script
using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour {
// Use this for initialization
void Start () {
loadAndCreate(null);
}
// Update is called once per frame
void Update () {
}
public static void loadAndCreate(string _url) {
Instantiate(WWW.LoadFromCacheOrDownload("https://www.dropbox.com/s/2ap3ixvab2lpqkn/Flame_ios.unity3d?dl=1", 1).assetBundle.mainAsset, new Vector3(0,5,0), Quaternion.identity);
}
}
It works absolutely fine in Editor. But when I load application on iPad everything I get is
starting www download:
Dropbox - Error - Simplify your life
And after this my main thread is halted.
Here is the stack trace when paused:
[1091-Screen+Shot+2012-06-02+at+2.57.56+PM.png|1091]
I’m using Unity 3.5.2f2 with iPhone Pro license.