Addressables — Overview
AchEngine's Addressables module wraps Unity Addressable Asset System and provides location metadata caching, asset-handle caching, and automatic watched-folder grouping. The static AddressableManager keeps initialization, loading, and releasing in one flow.
The module is enabled only when com.unity.addressables is installed. Install it from Project Settings › AchEngine Overview.
Core components
Usage rules
- Async APIs return
AchTaskorAchTask<T>and can be awaited. They use UniTask when installed andTaskotherwise. LoadAsyncreuses a handle for the same address;LoadAllAsyncreuses multi-load handles for the same label.- Cached handles also verify the requested asset type. A handle for the same address or label is not reused for an incompatible type.
- The cache does not count references. Call
Release(key)once when the owner no longer needs the asset. - Release objects created by
InstantiateAsyncwithReleaseInstance; release the source prefab cache separately withRelease(address). - Scenes are not unloaded automatically. Call
UnloadSceneAsync(address)explicitly.
Temporary handles used by initialization, download-size checks, dependency downloads, catalog checks, and catalog updates are released automatically. Loaded assets and scenes still require an explicit Release or UnloadSceneAsync.
Basic usage
Load and unload a scene
UnloadSceneAsync only unloads scenes loaded through this API and returns false for unmanaged addresses.
Download remote content
Clearing the cache
Release only the addresses owned by a screen or scene when its lifetime ends. For a full transition or logout, use AddressableManager.ReleaseAll() when it is safe to discard every cached asset.