Authoring vs. assembly
The package separates authoring (what you create) from assembly (what the generator builds from it). You paint rooms, build themes, and describe structure; DungeonManager chooses, places, and connects the room prefabs.
| Layer | Types | What it does |
|---|---|---|
| Authoring | RoomDesign, DungeonTheme | Cell-painted room designs and visual themes built from modular prefab families. |
| Authoring | DecorationProfile, DoorSocketType | Rules for filling rooms with decoration and tags that control doorway compatibility. |
| Assembly | DungeonTemplate, DungeonManager | Node/edge structure description and the MonoBehaviour that plans and materializes the dungeon. |
| Assembly | RoomDecorator | Optionally fills each generated room with constrained decoration. |
| Assembly | ChunkDungeonStreamer | Streams an expanding chunk world around a player instead of generating everything up front. |
The package does not ship a finished game, sample dungeon, demo scene, or production art — create those in your own content folder (see Dungeon Quick Start).
Editor tools
All editor windows live under Tools ▸ DungeonGen:
| Tool | Purpose |
|---|---|
Room Designer | Paint multi-floor room designs with floor, door, stair, and hole brushes; author decoration in Objects mode; save room prefabs. |
Dungeon Template Designer | Author the template tree (nodes and edges) and validate it before generation. |
Dungeon Theme Wizard | Detect tile size from floor prefabs, analyze offsets and dimensions, and preview seams. |
Dungeon Setup | Create a basic DungeonManager or ChunkDungeonStreamer setup object. |
Setup Room Prefab | Add RoomData, door sockets, or wall-fill setup to a saved room prefab. |
Authoring assets are created with Assets ▸ Create ▸ DungeonGen ▸ … (Room Design, Dungeon Template, DungeonTheme, Decoration Profile, Door Socket Type, Progression Requirement).
How generation works
A DungeonManager run validates the template, probes prefab bounds and sockets, plans the layout with backtracking (managed or optional Burst planner), materializes the rooms, wires socket pairs, places progression items, optionally decorates, and runs post-processors — clearing previous output only after a successful plan.
- TemplateExact — every template node becomes one room and every edge one connection, unless the optional random-branch setting is enabled.
- TemplateSequencedRandom — template nodes are milestones; filler rooms and optional random branches expand the layout for replayable variety.
A fixed seed reproduces the layout. The managed planner and the optional Burst planner are both deterministic, but the Burst planner uses a separate implementation and can produce a different valid layout for the same seed.
Getting started
- Dungeon Quick Start — the minimal flow: package setup, Theme Wizard, Room Designer, template, and
Generate(). - Dungeon API Reference — the source-verified public API in
namespace DungeonGen.
Keep the package at Assets/DungeonGenerator/ (several editor windows load their .uss stylesheets from that path) and keep your authored content in a sibling folder.
Chunk streaming
The chunk module expands a dungeon around a moving player instead of creating the whole world at once. ChunkDungeonStreamer plans a square neighborhood around the player and instantiates a smaller loaded radius; chunk instances are pooled and revisited chunks are reactivated rather than rebuilt.
A minimum setup needs a player, a mandatory 1×1 corridor prefab with cardinal DoorSockets (there is no procedural corridor fallback), entry prefabs or pool-only mode, and a cell size that matches the measured room grid.
Extending the toolkit
The runtime API is modular. You can implement or wrap IDungeonRenderer for another rendering backend, provide custom decoration geometry through IRoomGeometry, add post-processors that run after generation without modifying DungeonManager, and drive culling or progression from your own rules and contracts.
Keep game-specific implementations outside Assets/DungeonGenerator/ so the package stays reusable. Full details: Dungeon API Reference.
Status
The Procedural Dungeon Generator is in active development and not yet released. This documentation is verified against the current source snapshot and may change as the package evolves — no release date or store listing is claimed.