Skip to content

Addressable Assets

Any tools to assist with the usage of Addressable Assets can be found here.

Addressable Cache Manager

AddressablesCacheManager loads addressable assets from one place, so an asset is loaded once no matter how many owners ask for it. Ask for one with GetDisposableAsset<T>(AssetReference, IAssetsDisposer). The disposer owns the returned DisposableAsset<T>, and asking again with the same disposer returns the holder it already has. Underneath, AddressablesCacheManagerHelper takes one Addressables reference per asset and returns it when the last holder disposes. The manager lives on a GameObject so the cache can be inspected, and it releases everything it still owns in OnDestroy.

AddressablesCacheManager cacheManager = SystemAPI.ManagedAPI.GetSingleton<AddressablesCacheManager>();
DisposableAsset<Sprite> icon = cacheManager.GetDisposableAsset(_iconReference, disposer);
Sprite sprite = await icon.GetAssetAsync();

EditorAddressablesCacheManager is the edit mode version. It skips the cache and reads the asset straight from the reference through GetEditorAsset, so there is nothing to release.

AddressablesCacheStatus

  • None: Not loaded at all
  • Loading: In Progress
  • Loaded: Completed and stored in cache
  • Failed: Failed loading

AddressablesUtilsModule

Responsible for initializing the Addressable Cache Manager and storing it in ECS as a singleton.