2

Currently, I have uploaded collections of my scenes to a server in an asset bundle form. However, I'm unable to to delete the asset bundles that I have downloaded from the game before. I tried using

    WWW www = WWW.LoadFromCacheOrDownload (url, 1);         
    yield return www;
    // Handle error
    if (www.error != null)
    {
        Debug.LogError(www.error);
        yield return true;
    }
    else
    {
        Debug.Log("Loaded");
    }

    AssetBundle assetBundle = www.assetBundle;
    assetBundle.LoadAll ();
    www.assetBundle.Unload (false);
    www.Dispose ();

But I got these errors:

errors screenshot

Max Yankov
  • 12,551
  • 12
  • 67
  • 135
  • 1
    It's usually a good idea to just copy the error text rather than take a screenshot of the errors. First of all, the text scales better for mobile users of SO, and second, in Unity, errors (and other messages in the console) can have useful information that does not fit into the first two lines you see in the console window. – Max Yankov Apr 28 '15 at 06:51

1 Answers1

4

Caching class is responsible for Unity's download cache, and Caching.CleanCache will help to delete all asset bundles you have downloaded.

Max Yankov
  • 12,551
  • 12
  • 67
  • 135