- Home /
Loading AssetBundles when Offline
Hello, I was looking through the documentation and have found the only way to load asset bundles from the cache is to use WWW.LoadFromCacheOrDownload. However, I want to build for the use case that the asset bundle already exists in the cache, and the player is offline (when they don't have internet). How can I do this with WWW.LoadFromCacheOrDownload or another method?
Will WWW.LoadFromCacheOrDownload.assetBundle contain the assetBundle even if there is an error (from no internet connection)?
Answer by dorpeleg · Aug 25, 2013 at 07:05 AM
As the name of it suggests: LoadFromCache Or Download.
It will first check if the bundle is in the cache (not internet needed) and only if it's not there, it will try to connect and download.
This is not correct. I tried this and got the following error: You are trying to load data from a www stream which had the following error when downloading.
starting www download: http://r.playerio.com/r/easy-eater-ikddrbcqxeq3gooyudkpg/food-icons-iphone.unity3d You are trying to load data from a www stream which had the following error when downloading. The Internet connection appears to be offline.
Double checked and you are correct. Once the bundle is cached I don't get an error.
Answer by AprilRennyo · May 26, 2015 at 06:21 AM
The solution for this would be to save the asset bundle on local storage under some folder for future retrieval. I dont know how to do that !
Can anybody help ?
Anybody ?
Thanks !
Your answer
Follow this Question
Related Questions
How to import the object from server to unity 2 Answers
Build stripping and scenes in Asset Bundles 1 Answer
connecting to php? 2 Answers
Is it possible to check internet conneciton for WWW class downloading ? 3 Answers
Large memory footprint increase when assigning a GUITexture from a WWW Object on iPad 1 Answer