Search Unity

How do I get the file path of an asset bundle that has already been cached on iOS?

Discussion in 'iOS and tvOS' started by aikitect, Sep 5, 2013.

  1. aikitect

    aikitect

    Joined:
    Dec 28, 2012
    Posts:
    28
    Hello,

    I want to use WWW.LoadFromCacheOrDownload in order to load an asset bundle that has already been cached. How would I create the URL (in this case, the file path) of the file if my asset bundle's name is say, "my_asset_bundle.unity3d"?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    You don't do it that way. Just ask for the assetbundle from the URL it's hosted at. If Unity sees that the asset bundle is already downloaded, then it'll load the cached version. (Typically access to caches happens "behind the scenes", so for example on a processor you don't try to access the cache directly, you'd access the memory, and the cache kicks in to quicken the load or store.)