# 2. Groups Profiles and Play Mode Scripts Part of [[Addressables]]. Previous: [[1. Addressables Mental Model]]. Next: [[3. Loading Instantiating and Releasing]]. > [!note] Verification status > Install from Package Manager: `com.unity.addressables`. **2.9.1** is released for 6000.5; later 2.11 / 4.1 lines are also available (see the hub). Groups / Profiles / Play Mode Scripts are standard Addressables window concepts. **Exact 6000.5 / 4.x menu labels were not click-verified.** The 2.9 manual warns that **Use Asset Database** loads project files directly, so runtime edits can dirty assets — that warning is official. ## 2.1 Install 1. Package Manager > **Add package by name**: `com.unity.addressables`. 2. Start with **2.9.1** if you want the version Unity lists as released for this Editor, or a later *released* 2.11 / 4.1 line if you have a reason (4.x gives you `ToAwaitable()`, part 3). Read the changelog before you jump major versions mid-term. 3. Open the **Addressables Groups** window (the package adds it to the Window menu; the exact path can vary slightly by version). The first open usually creates Addressable settings and a **default group**. That default group is where assets land if you tick **Addressable** in the Inspector or assign a non-Addressable asset to an `AssetReference` (2.9.1 manual: Unity then *makes* it Addressable and puts it in the default group). Do not leave unique, heavy assets in a dump group — move them. ## 2.2 Mark an asset Select a prefab or texture. In the Inspector, enable **Addressable**. Give it a stable address, not a raw path you will rename. Add a **label** if it belongs to a set (`props`, `ui-icons`). Create groups by content that **loads together**: - `Boot.Local` — tiny, always packed with the player - `Location.Harbor` — one location's scenes, lightmaps, audio - `Shared.Characters` — reused across locations - `Remote.Patchable` — things you might update without a full player (part 6) Packing "one group per asset" wastes catalog and IO. Packing "everything in default" ruins streaming. Think like a disk-layout designer. ## 2.3 Profiles (paths, not Build Profiles) Addressables **Profiles** are not the same thing as Unity **Build Profiles** ([[1. Build Profiles]]). An Addressables profile is a set of path variables, typically: - Local build path / local load path (often StreamingAssets) - Remote build path / remote load path (a URL or CCD bucket) Create at least `Local` (everything packed with the player, good for class and for Quest when you are not doing remote download) and `RemoteDev` (runtime load path points at a development host). Switching the active Addressables profile changes where a content build writes and where the player looks. ## 2.4 Play Mode Scripts In the Play Mode settings (Groups window / Addressable settings), you choose how the Editor *pretends* to load: | Mode | What it does | Use it for | |---|---|---| | **Use Asset Database (fastest)** | Loads directly from the project | Day-to-day iteration. Official warning: edits to loaded assets can write back to the project file. Instantiate a *copy* if you will mutate. | | **Simulate Groups** (name may read "Use Existing Build" vs "Simulate" depending on version) | Exercises the grouping / catalog logic without a full player | Finding missing dependencies | | **Use Existing Build** | Loads the last content build | The only Play Mode that matches a Player. Required before you trust a remote path. | A bug that "only happens in the build" is often "we only ever pressed Play under Use Asset Database." ## 2.5 Folders as Addressable entries You can mark a folder Addressable and load by that folder's address. This is convenient and easy to get wrong during content updates (later 4.x changelogs fix several folder-update edge cases). For a class project, prefer explicit entries for anything you will patch. Use folders for large, always-together art dumps you never update in isolation. ## Official docs - Package page: https://docs.unity.com/en-us/engine/6000.5/manual/packages-list/packages-all/pack-safe/com-unity-addressables - Load assets (Play Mode / mutation warning): https://docs.unity3d.com/Packages/[email protected]/manual/load-assets.html