Scene Management API (async load/unload, additive, persistent)

Current State

Scenes can be loaded from JSON files but there is no formal Scene Management API. There is no support for async loading, additive scenes, persistent objects (DontDestroyOnLoad), or tracking loaded/active scenes.

Tasks:

  • Design the SceneManager API (load, unload, activate, list)
  • Implement async scene loading (background thread, progress reporting)
  • Implement additive scene loading (multiple scenes active simultaneously)
  • Implement persistent scene / DontDestroyOnLoad pattern (objects that survive scene transitions)
  • Implement scene tracking (get list of loaded scenes, get active scene)
  • Integrate with the asset database (resolve scene assets by ID)
  • Implement scene lifecycle events (onLoad, onUnload, onActivate, onDeactivate)
  • Handle scene dependencies (scenes that reference other scenes)
  • Add error handling for failed loads (missing assets, corrupted files)

Acceptance Criteria:

  • Scenes load asynchronously without blocking the main thread
  • Multiple scenes can be loaded additively
  • Objects marked as persistent survive scene transitions
  • API provides: getLoadedScenes, getActiveScene, loadScene(id), unloadScene(id)
  • Scene assets are resolved through the asset database
  • Scene lifecycle events are fired and can be subscribed to
  • Failed loads report clear error messages

, #11 (closed)

Edited by Bruno Massa