The Addressables system packs your assets in AssetBundles and loads these bundles "behind the scenes" as you load individual assets. You can control how AssetBundles load which are exposed on the BundledAssetGroupSchema
class. You can set these options through the scripting API or under the Advanced options in the inspector of the AddressablesAssetGroup
inspector.
Addressables can load AssetBundles via two engine APIs: UnityWebRequest.GetAssetBundle
, and AssetBundle.LoadFromFileAsync
. The default behavior is to use AssetBundle.LoadFromFileAsync
when the AssetBundle is in local storage and use UnityWebRequest
when the AssetBundle path is a URL.
You can override this behavior to use UnityWebRequest
for local Asset Bundles by setting BundledAssetGroupSchema.UseUnityWebRequestForLocalBundles
to true. It can also be set through the BundledAssetGroupSchema GUI.
A few of these situations would include:
UnityWebRequest
and have caching disabled, the entire AssetBundle file will be loaded into the memory cache. This increases your runtime memory usage, but may improve loading performance as it eliminates disk seeking after the initial AssetBundle load.
Both situations 1 and 2 above result in the AssetBundle existing on the player device twice (original and cached representations). This means the initial loads (decompressing and copying to cache) are slower than subsequent loads (loading from cache)