Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Multiple Asset Bundle Cache Problem

Discussion in 'Asset Bundles' started by naklow12, Jul 5, 2021.

  1. naklow12

    naklow12

    Joined:
    Jun 14, 2017
    Posts:
    8
    I'm using
    UnityWebRequestAssetBundle.GetAssetBundle(url, bundleData.version, bundleData.crc);
    system and I can successfully download and use bundleAssets online. But when I want to download multiple bundle assets and save them to use offline for later I have a problem.
    I have 2 files for example, 'A' and 'B'.
    Case 1: When I download A and go offline I can load A anytime even I close the app. But when I want to download B and come back to A can't load A again because it deletes cache for some reason and tries to download it again.

    Case 2: When I download A and B together and go offline, if I load B it loads. But if I try A it can't load and needs internet connection. After that when I try to load B again I loose package so it needs internet connection again.

    So basicly I want to download multiple asset bundles and I want to use them whenever I want. How can I solve this problem? Thanks.
     
  2. nilsdr

    nilsdr

    Joined:
    Oct 24, 2017
    Posts:
    374
    Bundles are identified by filename, do your a and b bundles have the same name?
     
  3. naklow12

    naklow12

    Joined:
    Jun 14, 2017
    Posts:
    8
    No. They all different.