vedaloivdocs

Guide

Demo Scenes

Documentation for v1.1.0Requires a free art packURP recommended

Four small scenes show the main features. Open a scene, press Play, and read the panel on screen. It explains what you are looking at, lists the controls, and shows live numbers. Press H to hide or show the panel.

On this page
  1. Requirements
  2. Import the free art pack
  3. Unity version and render pipeline
  4. 01_TemplateDungeon
  5. 02_InfiniteDungeon
  6. 03_CullingAndNavMesh
  7. 04_DecorationAndRoomDesigner
  8. Edit the room in the Room Designer
  9. What is in the demo folder
  10. Problems in the demos
SceneShows
01_TemplateDungeonDungeonManager with a template, a weighted room pool, and seeds in sequenced random mode.
02_InfiniteDungeonChunkDungeonStreamer: an endless dungeon that streams around a walking player.
03_CullingAndNavMeshPost-processors: runtime NavMesh bake, portal culling, and a click-to-move agent.
04_DecorationAndRoomDesignerA room from the Room Designer, decorated by its DecorationProfile: categories, a region for each, and manual pins.

All demo content is in Assets/DungeonGenerator/Demo/.

Requirements#

Import the free art pack#

The demo rooms use the free Asset Store package Lite Dungeon Pack - Low Poly 3D Art by Gridness. It is not included in Easy Dungeon Generator, so you need to import it yourself:

  1. On the Unity Asset Store, open the package page and click Add to My Assets. The package is free.
  2. In Unity, open Window › Package Manager › My Assets, select the pack, and click Import.
  3. Keep the default location, Assets/Gridness Studios/Elementary Dungeon Pack Lite/. The demo references its assets by GUID, so the demos still work when the folder is moved.

Unity version and render pipeline#

  • Unity 6000.5 or newer.
  • The demo scenes and materials are set up for URP (Universal Render Pipeline/Lit), built with URP 17.5.
  • On the Built-in Render Pipeline or HDRP, the Gridness materials and the two demo player materials appear pink. Convert them with your pipeline's material upgrader, or assign a Lit or Standard material by hand.
  • Input: the demo scripts support both the Input System and the legacy Input Manager. They follow Project Settings › Player › Active Input Handling.

01_TemplateDungeon#

A DungeonManager builds a dungeon from a template in TemplateSequencedRandom mode. The template is an Entrance, a Hub, a Treasure room, and a Boss room. The manager stretches the main path to 6 rooms with filler rooms, adds up to 4 random branch rooms, and spreads the work over frames with a budget of 8 ms. The scene uses the seed 1 with Use Random Seed off, so the same layout appears every time.

InputAction
RRegenerate with a new seed.
VShow or hide the ceilings.
Right mouse + moveLook around.
W A S D, Q / EFly, and go down or up.
Shift, mouse wheelFly faster, or change the fly speed.
HHide or show the panel.

What to inspect: select the Dungeon object and look at the DungeonManager. Its Wall Mode is DoubleOnly and its Allowed Seam Overlap is 0.71, so every connection has one shared wall and one door. To compare, set Wall Mode to SingleOnly and the overlap to 0 during play, then press R. Each room then keeps its own wall, and two walls meet at every seam.

The Boss and Treasure rooms are in the pool with the allowed context Template, so they never appear as filler rooms.

The DemoCeilingProcessor on the same object is a small post-processor that hides the ceilings after each generation. Use it as a template for your own processors.

02_InfiniteDungeon#

A ChunkDungeonStreamer divides the world into chunks of 24 × 24 cells. Each cell is 4.84 m, so a chunk is about 116 m across. Each chunk has an entry room and 1 to 3 more rooms. The corridors come from a 1 × 1 corridor module.

  • The chunks inside the loaded radius (1, a 3 × 3 area) are built. The chunks inside the planned radius (2) are planned but not built.
  • When the player crosses a chunk border, the new chunks are built over several frames, with a budget of 4 ms. The chunks you leave are deactivated and reused.
  • The player is spawned in the entry room of chunk (0, 0).
InputAction
W A S DWalk, relative to the camera.
ShiftRun.
Right mouse + moveOrbit the camera.
Mouse wheelZoom.
VShow or hide the ceilings.
HHide or show the panel.

The panel shows the current chunk, the loaded and planned chunk counts, the world seed, and whether chunks are being built.

What to inspect: the ChunkDungeonStreamer object. Its Cell Size (m) is 4.837726, the tile size of the demo theme. Chunk Size (Cells) is 24, Min. Rooms is 2 and Max. Rooms is 4, and Frame Budget (ms) is 4.

The chunk planner has stricter rules than the DungeonManager. Every entry and pool room needs a door on each of the four sides, and the corridor must be a 1 × 1 floor with exactly one door per side (Demo/Layouts/Demo_Corridor). See Chunk Streaming.

03_CullingAndNavMesh#

This scene runs the post-processors on the Dungeon object after each generation, highest priority first:

PriorityComponentJob
100DemoCeilingProcessorTurns off the ceilings, so the top-down camera and the mouse clicks reach the floor, and the roof is not baked into the NavMesh.
50DemoColliderProxyProcessorReplaces the art pack's mesh colliders with box colliders. See Troubleshooting.
0DungeonNavMeshPostProcessorBakes one NavMesh for the whole dungeon.
−10DungeonCullingMode DisableRenderers: hides every room more than 2 doors or 55 m away from the player.

The manager uses the same Wall Mode and overlap as scene 01, so the NavMesh runs through exactly one door per connection. The player is the manager's prototype player, a NavMeshAgent with ClickToMoveAgent. It spawns in the entrance after generation, and a camera keeps it in view.

InputAction
Left clickMove the agent to the clicked point.
CTurn culling on or off. Compare the Visible rooms count in the panel.
RRegenerate with a new seed.
HHide or show the panel.

What to inspect: DungeonCulling (its mode, max hops, view distance, and the toggles). Turn on Debug Draw and watch the Scene view: green rooms are visible, red rooms are hidden. DemoCullingController sets the culling reference to the spawned player. Inspect DungeonNavMeshPostProcessor for the agent type, the layer mask, and the door links.

To use this in your own kit, click Add NavMesh Support and Add Culling Support on your DungeonManager, then set the culling mode. Read the Culling and NavMesh guide for the details.

04_DecorationAndRoomDesigner#

This scene shows one room, Demo_DecorationShowcase, painted in the Room Designer and decorated at runtime. Its prefab holds a RoomDecorationAuthoring snapshot and the profile DecorationProfile_Showcase, which has eight categories:

  • Pinned Treasure Chest and Pinned Banner: manual pins on one floor cell and one wall cell.
  • Wall Torches: on walls, away from the doors, auto-fitted to the wall.
  • Shelves: along the edges of the floor, facing away from the wall.
  • Corner Barrels: in the corners of the room.
  • Floor Furniture: in the interior of the room.
  • Chairs (near furniture): placed near the furniture.
  • Floor Clutter: small props that do not block paths.

Pins are placed first. The solver then fills each category up to its target. The panel lists the placed and target count for each category. The solver is deterministic: the same seed gives the same result.

InputAction
RReroll the whole room with a new seed.
Right mouse + moveLook around.
W A S D, Q / E, ShiftFly.
HHide or show the panel.

Edit the room in the Room Designer#

  1. Open Tools › DungeonGen › Room Designer and load Demo/Layouts/Demo_DecorationShowcase.
  2. In Layout mode, paint floor cells, doors, and stairs. Walls and ceilings are created automatically.
  3. In Objects mode, edit the profile. Add or change categories, set the surface, region, amount, spacing, and relations, and click cells to add pins. The Scene view shows the result.
  4. Click Save Prefab. Leave Bake Decor off to decorate at runtime, as this demo and the DungeonManager do. Turn it on to store the furniture in the prefab.

Pins are stored in the profile, so every room that uses the profile gets them. That is why the showcase has its own profile. The generated rooms in scene 01 and 03 use DecorationProfile_Dungeon, which has no pins.

What is in the demo folder#

Folder or assetContent
Scenes/The four demo scenes.
Scripts/Small demo scripts in the namespace DungeonGen.Demo.
DungeonTheme_Demo.assetThe theme that maps the Gridness pieces to floor, wall, door, and ceiling roles. Tile size 4.84 m, with Double-Sided Walls on.
Layouts/Room Design assets. Open them in the Room Designer.
Rooms/Room prefabs saved from those layouts.
Template/DemoTemplate.assetThe template for scene 01, which you can open in the Template Designer.
Decoration/DecorationProfile_Dungeon and DecorationProfile_Showcase.
Prefabs/The demo player and the click-to-move agent.

The demo folder is optional. You can delete it from your project at any time, without affecting the generator. The art pack is never part of the package.

Problems in the demos#

Most demo problems come from a missing art pack, a non-URP render pipeline, or a model without Read/Write. The Troubleshooting page lists the fixes.