Search Unity

Failed to initialize cache data

Discussion in 'Editor & General Support' started by diekeure, Sep 19, 2016.

  1. diekeure

    diekeure

    Joined:
    Jan 25, 2013
    Posts:
    221
    Hello,

    We are receiving bug reports from numerous users that look like this:

    Failed to initialize cache for the AssetBundle 'http://url.to.assetbundle'. URL: http://url.to.assetbundle

    Our code for loading any assetbundle looks like this:

    Code (csharp):
    1.  
    2. while (!Caching.ready)
    3.   yield return null;
    4. using (WWW www = WWW.LoadFromCacheOrDownload(url, version))
    5. {
    6.   yield return www;
    7.   if (!string.IsNullOrEmpty(www.error)) {
    8.     Debug.LogErrorFormat("WWW download failed {0}: {1}", fullurl, www.error);
    9.   }
    10.   else
    11.   {
    12.     // do something with the bundle
    13.     www.Dispose();
    14.   }
    15. }
    16.  
    What can I do about this? What could be the reason that the user's cache could not be initialized? Unfortunately we cannot reproduce this ourselves, but we receive lots of these errors via bugsnag.

    Thank,
    Alex
     
  2. Pulas

    Pulas

    Joined:
    Feb 26, 2014
    Posts:
    10
    I have the same problem sometimes. It is hard to reproduce. How to solve it?