Architecture

Three layers, and scenes kept in an engine-independent format.

Layers

  1. Core packages (3d-*): shared engine functionality such as scenes, assets, interaction, XR, and spatial data.
  2. Constructors (3d-constructor-*): a starting architecture for one type of game, built on the core packages.
  3. Game-specific packages (game-<name>-*): the rules, content, and assets of one game.

Scenes and the schema

3d-scene-schema is the source of truth for a scene. Unity is not its permanent owner.

Scene Schema → Unity Scene → Scene Changes → Scene Schema

3d-unity-scene converts between the two. 3d-unity-xr handles how people interact through XR hardware, and 3d-unity-spatial understands the physical room and turns it into scene data.

Package dependencies

Each line joins a package to one that needs it, as declared in each package.json.

Principles

  • Keep core packages reusable and product-independent.
  • Keep constructors focused on reusable gameplay architecture.
  • Keep game-specific logic outside the framework.
  • Prefer shared scene and asset structures between engines.
  • Let constructors compose existing packages instead of duplicating them.
  • Make generated projects easy to understand, modify, and extend.