dev-asset-loading

Implements Unity Addressables loading patterns with async handles, batch loading, and memory release enforcement.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Unity-UPM-Packages/Antigravity-skills --skill dev-asset-loading-unity-upm-packages
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-asset-loading
Source: https://github.com/Unity-UPM-Packages/Antigravity-skills/tree/main/.agents/skills/dev-asset-loading
Command: npx skills add https://github.com/Unity-UPM-Packages/Antigravity-skills --skill dev-asset-loading-unity-upm-packages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Runtime asset loading in Unity often relies on legacy Resources.Load calls and unmanaged handles, causing memory leaks, orphaned assets, and failed loads without error handling. This Skill enforces a consistent Addressables-based pipeline with paired release calls and status checks. ## Core Features & Use Cases - Safe Async Loading Patterns: Provides ready-to-use C# templates for Addressables.InstantiateAsync, LoadAssetAsync, and label-based batch loading with UniTask and CancellationToken integration. - Memory Release Enforcement: Maps every load scenario (prefab instances, assets, batches, scenes) to its correct release method so no handle is left orphaned. - Mobile Group Strategy: Defines Addressable group organization (Built-In, Remote-Static, Remote-Dynamic, Preload) and a 150-200 MB per-scene GPU memory budget for mobile titles. - Use Case: When migrating a Unity mobile game away from Resources.Load, use this Skill to rewrite spawners and scene loaders with Addressables, add loading-screen progress reporting, and verify every handle is released in OnDestroy. ## Quick Start Ask the AI to refactor a MonoBehaviour that uses Resources.Load into an Addressables-based loader with proper error handling and release logic.

Frequently Asked Questions about dev-asset-loading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load a prefab at runtime with Unity Addressables?▼

Use Addressables.InstantiateAsync with an AssetReferenceGameObject, await the AsyncOperationHandle, and check that Status equals AsyncOperationStatus.Succeeded before using the result. Release the instance later with Addressables.ReleaseInstance in OnDestroy.

How to batch load assets by label in Unity Addressables?▼

Call Addressables.LoadAssetsAsync with a label string like "EnemyPrefabs" and a per-asset callback. Track the returned handle in a collection so the entire batch can be released together with Addressables.Release when no longer needed.

Should I use Resources.Load or Addressables in Unity?▼

Addressables is the required approach; Resources.Load is forbidden unless a legacy system explicitly demands it with documented justification. Addressables supports remote CDN delivery, memory management via handles, and label-based batch loading that Resources cannot provide.

Why does my Unity Addressables build leak memory?▼

Leaks occur when loaded assets lack a paired release call, leaving orphaned handles. Every InstantiateAsync needs ReleaseInstance, every LoadAssetAsync needs Release, and scene loads need UnloadSceneAsync, typically triggered in OnDestroy or IDisposable.Dispose.

How do I show a loading progress bar for Addressables scene loading?▼

Call Addressables.LoadSceneAsync, then poll handle.PercentComplete in a loop while awaiting UniTask.Yield each frame, reporting values to an IProgress<float>. After completion, verify the handle status succeeded before continuing.