Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Asset Bundle WWWCached data can only be accessed using the assetBundle property!

Discussion in 'Editor & General Support' started by shadowfork, Feb 25, 2014.

  1. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    So I have an iOS project in Unity 3.5.7 that gets asset bundles just fine.

    After upgrading to Unity 4.3, it started to crash and I get this from the XCode log:
    WWWCached data can only be accessed using the assetBundle property!

    I noticed that if I keep:
    using(WWW www = WWW.LoadFromCacheOrDownload (BundleURL, version))

    I get the crash and error.

    But if I use:
    using(WWW www = new WWW(BundleURL) )

    It works just fine again. Only I need them to be cached so I don't wait for a long download next time.

    Is this a known bug? And does anyone have any tips?

    I just followed the steps mentioned in the manual: https://docs.unity3d.com/Documentation/Manual/DownloadingAssetBundles.html

    Thanks in advance :)
     
  2. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Bump. Anyone? Is the WWW class broken?
     
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    This is relevant to my interests... We are in the process of implementing AssetBundles and would really like to know if it's broken or not in 4.3
     
  4. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
  5. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Happy Monday bump.
     
  6. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Someone help.

    Please.

    :(
     
  7. renanse

    renanse

    Joined:
    Apr 12, 2013
    Posts:
    21
    I have the same issue. What fields of WWW do you access afterwards? Also do you use any of the new WWW fields like bytesDownloaded by chance?
     
  8. shadowfork

    shadowfork

    Joined:
    Jan 8, 2010
    Posts:
    167
    Hmmm.... this is really troubling. I tried again today and now it works.

    I'm more worried now if it fails again when the app is live.
    I wonder if using mscorlib on the stripping option is causing it.

    Yes, I look at bytesDownloaded just to check if i got all the data.
     
  9. inewland

    inewland

    Joined:
    Dec 6, 2012
    Posts:
    20
    I ran into this problem due to my yield return in the !www.isDone while loop...

    while(!wwwDownload.isDone)
    {
    yield return null; // (Instead of: yield return 0;)
    }
     
  10. daleth90

    daleth90

    Joined:
    Dec 15, 2014
    Posts:
    10