Getting Started: Scene Setup & First Generation
Now that we have our dungeon flow set up, it's time to generate it.
Setting Up the Generator
Start with a clean scene or an empty GameObject in your existing one.
- Create a new
GameObjectand name it Dungeon Generator - Add the
Runtime Dungeoncomponent:
Add Component > DunGen > Runtime Dungeon

In the Inspector:
- Assign your Dungeon Flow asset to the appropriate field
- Make sure Generate On Start is checked
Now when you enter Play Mode, DunGen will automatically generate a dungeon based on your setup.
🎥 Tip:
Switch to the Scene view during Play Mode to fly around and inspect the layout.

Generating in Code
We can generate a new dungeon in code as follows. Add this new component to any GameObject in your scene and be sure to assign your Runtime Dungeon to the field. Now, pressing R will generate a new random dungeon.