Skip to main content

Zenject Demo

Overview

The project demonstrates a small game world built on World Graph Editor, where every scene transition is driven through a Zenject-managed TransitionService. Use it as a reference for integrating WGE into a DI-first codebase.

What's inside

  • A WorldGraphContainer asset with 4 sample scenes connected via undirected and one-way edges.
  • A custom TransitionService registered in the ProjectContext installer.
  • Scene-bound SceneContext installers showing per-scene bindings.

How to run

  1. Download the archive above and extract it.
  2. Open the project in Unity 2022.3 LTS or Unity 6.
  3. Open Assets/Scenes/Main.unity and press Play.
  4. Use the in-scene portals to trigger transitions through the WGE graph.

Key files

  • Assets/Scripts/Installers/ProjectInstaller.cs — registers TransitionService.
  • Assets/Scripts/Services/TransitionService.cs — calls TransitionManager.GoTo under the hood.
  • Assets/Graphs/MainWorld.asset — the WorldGraphContainer used by the demo.

Caveats

  • Requires the Zenject (or Extenject) package — install it via Unity Package Manager before opening the scene.
  • Asset GUIDs are stable; if you upgrade WGE, re-link the graph asset in the inspector if needed.