I’m trying to retrieve asset bundles from azure to unity and I wanted to save the asset bundles to a specific location like “Assets/Bundles Folder” in runtime. I’m able to retrieve bundles from azure blob to unity. Need help with how to save the asset bundles to a folder at runtime like mentioned.
What is the reason for saving the asset bundle and not using Unity builtin caching?
Thanks for the response.
I’m trying to make the application work even if it is offline by reading the previous downloaded bundles from a local folder. If the application got internet connection, it will get latest bundles from the cloud and I want to save them to a file so that I can read them when I open/restart the application later even without internet. I’m not sure how to use unity builtin caching to achieve that functionality. Would you please guide me how to achieve that.
The built-in cache is designed exactly for such behavior: you download and cache asset bundle and in the the future you load that bundle from cache without downloading them.
These are the primary APIs for that:
Note, that not all variants are caching, read the documentation.
UnityWebRequest has no proper proxy handling. Our customers using the unity build mostly from behind a proxy in their companies. This is a problem since years. So i see no other choice than to use HTTPWebRequest or BestHTTP instead of UnityWebRequest and then handle the whole caching of the asset bundles by ourselfs.