Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

unity-addressables

/unity-addressables

Obsługuje Unity Addressables: AssetReference, asynchroniczne ładowanie, etykiety, grupy, profile buildów, zdalną zawartość, katalogi i aktualizacje zawartości, jako zamiennik Resources.Load.

Licencja
MIT
Ostatnia zmiana repozytorium
21.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 21.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Obsługuje Unity Addressables: AssetReference, asynchroniczne ładowanie, etykiety, grupy, profile buildów, zdalną zawartość, katalogi i aktualizacje zawartości, jako zamiennik Resources.Load.

Oryginalny opis (EN)

Unity Addressables — AssetReference, async loading, labels, groups, build profiles, remote content, Cloud Content Delivery integration, content catalogs and updates. USE WHEN: replacing `Resources.Load`, async asset loading, scene streaming, remote content, DLC delivery, runtime asset hot-swap, splitting builds for size. DO NOT USE FOR: editor-time asset queries (use AssetDatabase); legacy Asset Bundles workflows (Addressables wraps them).

Jak działa

  1. Why Addressables (vs Resources / direct refs)
  2. AssetReference
  3. Loading by label
  4. Build profiles
  5. Content updates (without rebuilding the player)
  6. Cloud Content Delivery (Unity Gaming Services)
  7. Anti-patterns
  8. Production checklist
Sekcje z nagłówków SKILL.md, w oryginale · 76 linii, 380 słów
Podgląd SKILL.md
---
name: unity-addressables
description: |
  Unity Addressables — AssetReference, async loading, labels, groups, build
  profiles, remote content, Cloud Content Delivery integration, content
  catalogs and updates.

  USE WHEN: replacing `Resources.Load`, async asset loading, scene streaming,
  remote content, DLC delivery, runtime asset hot-swap, splitting builds for
  size.

  DO NOT USE FOR: editor-time asset queries (use AssetDatabase); legacy Asset
  Bundles workflows (Addressables wraps them).
allowed-tools: Read, Grep, Glob, Write, Edit
---

# Unity Addressables

## Why Addressables (vs Resources / direct refs)

- `Resources/` includes everything in build → forces every asset in memory.
- Direct prefab references → load immediately with the scene.
- Addressables: lazy, async, remote-capable, content-update-friendly.

## AssetReference

```csharp
public class EnemySpawner : MonoBehaviour {
    [SerializeField] private AssetReferenceGameObject enemyPrefab;
    [SerializeField] private Transform spawnPoint;

    public async void Spawn() {
        AsyncOperationHandle<GameObject> handle =
            enemyPrefab.InstantiateAsync(spawnPoint.position, Quaternion.identity);
        var enemy = await handle.Task;
        // listen for destroy → release
        enemy.GetComponent<Enemy>().Killed += () => Addressables.ReleaseInstance(enemy);
    }
}
```

`InstantiateAsync` reference-counts; release with `ReleaseInstance` to free memory.

## Loading by label

```csharp
var handle = Addressables.LoadAssetsAsync<AudioClip>("music", null);
var clips = await handle.Task;        // all assets with label 'music'
// later
Addressables.Release(handle);
```

## Build profiles

- **Development** — local groups, fast iteration.
- **Release** — remote groups (CDN URL), packed bundles.

Set in `Window > Asset Management > Addressables > Profiles`. CI builds invoke `Addressables.BuildPlayerContent()` or `AddressablesPlayerBuildResult`.

## Content updates (without rebuilding the player)

1. Mark a group as **Content Update Restriction = Can Change Post Release**.
2. Build content → produces `addressables_content_state.bin` (commit).
3. Later, `Build > Update a Previous Build` → produces incremental bundles → upload to CDN. Player downloads the new catalog on launch.

## Cloud Content Delivery (Unity Gaming Services)

- Bucket per environment (dev/staging/prod).
- Badge tags ("release-1.2") to pin clients to specific releases.
- Authentication via UGS for entitled content.

## Anti-patterns

| Anti-pattern | Fix |
|---|---|
| `Resources.Load` for big asset graphs | Migrate to Addressables |
| Forgetting to `Release` | Reference-count leaks → run Profiler memory snapshot regularly |
| Massive single group | Split by usage (per-level, per-language, music vs SFX) |
| Sync `WaitForCompletion` on remote loads | Always async; show loading UI |
| Different bundle compression per platform forgotten | Default LZ4 for all desktop/mobile; Uncompressed for WebGL on tiny assets |

## Production checklist

- [ ] No `Resources/` folders left in production code paths
- [ ] Groups split by load pattern
- [ ] Labels used for batch loads (music, vfx-rare, boss-only)
- [ ] CDN URL profile-driven, not hardcoded
- [ ] `addressables_content_state.bin` checked into git
- [ ] CI builds Addressables before player build
- [ ] Memory profiler shows expected residency after scene load

Wersje

W bazie nie ma innych skilli o nazwie unity-addressables.

Migawka bazy z 13.11.2026 · wersja paczki dac20100cd58 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90unity-addressables-design
    Planuje grupy, etykiety, profile i granice zależności w Addressables w projekcie Unity.
  • 100unity-platforms
    Prowadzi przez budowanie gier Unity 6 na wybrane platformy: profile buildów, definicje #if UNITY_IOS i UNITY_ANDROID, optymalizację pod mobile, WebGL i konsole, Addressables oraz wybór między IL2CPP a Mono.
  • 100unity-build-platforms
    Obsługuje buildy Unity na platformy: IL2CPP i Mono, profile buildów, Android (Gradle, AAB, Play Asset Delivery), iOS (Xcode), WebGL, podpisywanie, wysyłkę do sklepów i CI wieloplatformowe.
  • 100unity
    Pomaga w Unity, silniku gier 2D, 3D, AR i VR: skrypty C#, kontroler gracza, ScriptableObjects, Addressables, input, buildy headless w CI oraz wybór wersji i licencji.
  • 100scenario-unity-pipeline-automation
    Automatyzuje pipeline treści i buildy w Unity 6.3: reguły AssetPostprocessor, generowanie prefabów, Addressables, testy walidacji treści oraz buildy batch i CI (Build Profiles, GameCI, GitHub Actions).
  • 95unity-development
    Zbiera wzorce Unity 6: drzewo decyzji architektury, migracje Addressables, Input System, skrót DOTS, katalog błędów i pulę obiektów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.