dev-scene-management

Architects async scene loading, additive workflows, and per-scene dependency bootstrapping in Unity.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unity projects often suffer from frozen frames caused by synchronous scene loads, tangled cross-scene references, and memory leaks from unreleased Addressable handles. This Skill provides a structured architecture for scene transitions, bootstrapping, and cleanup that avoids these pitfalls. ## Core Features & Use Cases - Async Scene Loading: Implements an Addressables-based SceneLoader with UniTask, progress events, and additive loading to prevent gameplay freezes. - Per-Scene Bootstrapping: Enforces self-contained DI roots per scene using Manual DI by default, with a VContainer LifetimeScope migration path for complex scenes. - Memory Cleanup Rules: Defines DontDestroyOnLoad allowlists, event unsubscription, handle release, and post-transition GC patterns. - Use Case: When building a mobile game with a persistent services scene plus additive menu and gameplay scenes, use this Skill to wire the SceneLoader, loading screen, and GameplayBootstrapper without scene coupling. ## Quick Start Ask the AI to design the scene transition flow and bootstrapper for a new gameplay scene using Addressables and Manual DI.

Frequently Asked Questions about dev-scene-management

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

FAQPage Schema
How do I load scenes asynchronously in Unity without freezing?▼

Use Addressables.LoadSceneAsync with LoadSceneMode.Additive and await it via UniTask instead of the synchronous SceneManager.LoadScene. Report progress through AsyncOperationHandle.PercentComplete and call SceneManager.SetActiveScene once loading succeeds.

How to set up dependency injection per scene in Unity?▼

Give each scene a self-contained Bootstrapper MonoBehaviour that creates pure C# systems in Awake and injects them into views via Construct methods. When a scene has more than eight systems or needs child scopes, migrate to a VContainer LifetimeScope.

When should I use VContainer instead of manual DI in Unity?▼

Use VContainer when a scene has many dependencies, roughly more than eight systems, or requires child scopes and automatic disposal. For simpler scenes, manual constructor injection in a Bootstrapper keeps the dependency tree explicit and lightweight.

Which services are allowed to use DontDestroyOnLoad?▼

Only services that genuinely must persist across all scenes, such as AudioManager, AnalyticsService, and InputSystem. Scene-scoped objects like GameManager, UIManager, PlayerController, and EnemyManager must be re-instantiated per scene by their Bootstrapper.

Why does memory grow after unloading a Unity scene?▼

Memory grows when Addressable handles loaded by the scene are not released or event subscriptions remain active. Release all scene-owned handles, unsubscribe scene-scoped events, then call Resources.UnloadUnusedAssets and GC.Collect after major transitions.