Documentation / Overview

Procedural Dungeon Generator

A node-based dungeon and level generator toolkit for Unity. Paint rooms with RoomDesign, build visual themes from modular prefabs with DungeonTheme, describe structure with DungeonTemplate, and let DungeonManager choose, place, and connect it all — with optional procedural decoration and chunk streaming around a player.

vedaloiv / source-verified docsUnity 6namespace DungeonGen
Procedural Dungeon Generator node-based dungeon layout with entrance, rooms, treasure and boss
Procedural Dungeon GeneratorSource-verified
01 / Core model

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.

LayerTypesWhat it does
AuthoringRoomDesign, DungeonThemeCell-painted room designs and visual themes built from modular prefab families.
AuthoringDecorationProfile, DoorSocketTypeRules for filling rooms with decoration and tags that control doorway compatibility.
AssemblyDungeonTemplate, DungeonManagerNode/edge structure description and the MonoBehaviour that plans and materializes the dungeon.
AssemblyRoomDecoratorOptionally fills each generated room with constrained decoration.
AssemblyChunkDungeonStreamerStreams 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).

02 / Workflow

Editor tools

All editor windows live under Tools ▸ DungeonGen:

ToolPurpose
Room DesignerPaint multi-floor room designs with floor, door, stair, and hole brushes; author decoration in Objects mode; save room prefabs.
Dungeon Template DesignerAuthor the template tree (nodes and edges) and validate it before generation.
Dungeon Theme WizardDetect tile size from floor prefabs, analyze offsets and dimensions, and preview seams.
Dungeon SetupCreate a basic DungeonManager or ChunkDungeonStreamer setup object.
Setup Room PrefabAdd RoomData, door sockets, or wall-fill setup to a saved room prefab.
DungeonGen tools menu listing Setup Room Prefab, Dungeon Setup, Dungeon Template Designer, Dungeon Theme Wizard, and Room Designer.
Open the DungeonGen editor workflow tools from the Unity Tools menu.

Authoring assets are created with Assets ▸ Create ▸ DungeonGen ▸ … (Room Design, Dungeon Template, DungeonTheme, Decoration Profile, Door Socket Type, Progression Requirement).

03 / Runtime

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.

04 / First run

Getting started

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.

05 / Large worlds

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.

06 / Extension

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.

07 / Status

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.

Back to top ↑