A Unity scene management framework implementing the Additive Scene Loading pattern with Service Locator dependency injection for scalable, modular game architecture.
- SceneLoader: Orchestrates sequential additive scene loading with progress tracking and events
- SceneLoadConfig: ScriptableObject for configuring bootstrap, persistent, and main scenes
- PersistentSceneManager: Manages DontDestroyOnLoad objects with lifecycle tracking
- SceneTransitionManager: Runtime scene loading/unloading, reloading, and game reset functionality
- ServiceLocator: Generic service registration and retrieval pattern
- Create scenes:
Bootstrap,PersistentSystems,MainScene - Create SceneLoadConfig asset:
Assets > Create > InitSolution > Scene Load Config - Configure scene names in the config
- Add
SceneLoadercomponent to Bootstrap scene - Assign config and set
autoStart = true
SceneLoader.OnPersistentScenesLoaded += HandlePersistentLoaded;
SceneLoader.OnMainSceneLoaded += HandleMainLoaded;
SceneLoader.OnLoadingProgress += UpdateProgressBar;ServiceLocator.Register<IAudioService>(audioService);
var audio = ServiceLocator.Get<IAudioService>();SceneTransitionManager.Instance.LoadSceneAdditive("Level1", setAsActive: true);
SceneTransitionManager.Instance.ResetGame();PersistentSceneManager.MarkSceneAsPersistent(scene);
PersistentSceneManager.CleanupAllPersistentObjects();SceneLoader: OnPersistentScenesLoaded, OnMainSceneLoaded, OnLoadingComplete, OnLoadingProgress
SceneTransitionManager: OnSceneLoadStarted/Completed, OnSceneUnloadStarted/Completed, OnTransitionProgress
ServiceLocator: OnServiceRegistered, OnServicesCleared
See Examples/ namespace for complete implementations of Bootstrap, GameManager, DataPersistence, SceneTransitions, and ServiceInitializer patterns.