# 7. Addressables Pitfalls and Quest Part of [[Addressables]]. Previous: [[6. Content Builds Updates and CI]]. > [!note] Verification status > Pitfalls come from the 2.9.1 manual (asset mutation under Use Asset Database, first-only `LoadAssetAsync` on labels, release rules) and from standard Addressables practice. Quest guidance is budget-oriented and cross-links [[6. Quest Performance Budgets]]; this part was **not** run on a headset. ## 7.1 Pitfalls 1. **Never releasing a handle.** The bundle stays in memory. Pair every load path with a release path (`OnDestroy`, leaving a location, leaving a language). Confirm with the Memory Profiler. 2. **`LoadAssetAsync` with a label that matches many assets.** You get the first one only. Use `LoadAssetsAsync`. 3. **Releasing too early** while instances or a loaded scene still need the asset. Own the handle at the same scope as the loaded content. 4. **`Destroy` on an `InstantiateAsync` instance without `ReleaseInstance`.** Or the opposite: releasing and also destroying in a way your version does not like. Pick the matching teardown API and use it once. 5. **Mutating a prefab or material in Play Mode under Use Asset Database.** You may have edited the project asset. Instantiate a copy; official warning in the 2.9 load-assets page. 6. **Trusting Play Mode without a content build.** Switch to **Use Existing Build** before you call a Player "verified." 7. **Everything in the default group.** Streaming and patches become impossible to reason about. 8. **Addresses that are file paths.** Rename the asset, break the game. Use stable keys. 9. **A catalog and a set of bundles that came from different builds.** "Key not found" is often "we uploaded yesterday's catalog with today's bundles" (or the inverse). 10. **Remote content on the critical boot path**, especially on Quest with no network. Keep a local boot, optional remote extras, and a retry UI. 11. **Forgetting Localization / other packages' Addressable groups** in the content build. 12. **Calling `ToAwaitable()` on 2.9.** That API is 4.0+. Stay on coroutines or `handle.Task` until you upgrade. 13. **Building content for the wrong Addressables profile** in CI, so the player looks in StreamingAssets for files you wrote to a remote build folder (or the reverse). 14. **Loading a component type directly.** Load the GameObject, then get the component. 15. **Spawning every projectile with `InstantiateAsync`.** Load once, pool instances ([[Interactable Audio]] does this for audio; the pattern is the same). ## 7.2 Quest and mobile - Prefer **local** groups for anything needed to play the first room. Remote download is a feature, not a requirement, and a Quest 2 will punish huge first-time downloads and huge resident memory. - Measure resident memory with a device snapshot after a location load ([[3. Memory Profiler Snapshots]], [[6. Quest Performance Budgets]]). - Compress textures for platform (ASTC on Quest) *before* you pack groups; Addressables will not save you from an uncompressed 4K. - Unload a location completely before you load the next, unless you have a measured budget for both. - Vulkan / URP settings still come from the Android Build Profile, not from Addressables ([[3.Quest 2 Project and Build Setup]]). `com.unity.addressables.android` is a released package on 6000.5 aimed at Android-specific Addressables behaviour (Play Asset Delivery and similar). It is **not documented in this series** — open its package page if you need store-style asset packs; do not assume it is required for a sideloaded Quest lab APK. ## 7.3 A small checklist - [ ] Boot scene is in the Unity Build Profile; locations are Addressable - [ ] Every runtime load has a matching release - [ ] CI runs a content build before the player build - [ ] Play Mode was tested with Use Existing Build at least once - [ ] Addresses are stable names - [ ] A Memory Profiler compare after "enter harbor, leave harbor" returns to a similar resident size ## Official docs - Load assets / unload (2.9.1): https://docs.unity3d.com/Packages/[email protected]/manual/load-assets.html - https://docs.unity3d.com/Packages/[email protected]/manual/UnloadingAddressableAssets.html - Package page: https://docs.unity.com/en-us/engine/6000.5/manual/packages-list/packages-all/pack-safe/com-unity-addressables