Build Dungeon
It's time to use everything we've created to build a dungeon
Create Theme file
Create an empty theme file somewhere in the content browser. We'll visit this later to spawn items in our modules (like NPCs, Spawners, Pickups, player prefab etc.)
![Ut 09 70 Ut 09 70](dungeon-architect-docs/ut-09-70.png)
Rename it to GameItemTheme
![Ut 09 71 Ut 09 71](dungeon-architect-docs/ut-09-71.png)
Setup Dungeon Game Object
Create a new scene and drop in a
DungeonSnapGridFlow
prefab fromAssets > CodeRespawn > DungeonArchitect > Prefabs
Select the
DungeonSnapGridFlow
game object and inspect the propertiesWe'll assign the three assets we've created earlier
Assign the
GameItemTheme
create created aboveAssign the Snap Grid Flow Graph
Assign the Module Database
Build Dungeon
Select the DungeonSnapGridFlow
game object and click Build Dungeon
![Ut 09 78 Ut 09 78](dungeon-architect-docs/ut-09-78.png)
![Ut 09 79 Ut 09 79](dungeon-architect-docs/ut-09-79.png)
![Ut 09 80 Ut 09 80](dungeon-architect-docs/ut-09-80.jpg)
Change the seed and click build again to get a different dungeon
![Ut 09 81 Ut 09 81](dungeon-architect-docs/ut-09-81.png)
![Ut 09 82 Ut 09 82](dungeon-architect-docs/ut-09-82.jpg)
Debug Draw
You get a debug overlay of the layout graph rendered by default when you build the dungoen. You'll want to turn this off in your final dungeon
Do this by unchecking the Debug Draw
check box and rebuild the dungeon
![Ut 09 84 Ut 09 84](dungeon-architect-docs/ut-09-84.png)
![Ut 09 83 Ut 09 83](dungeon-architect-docs/ut-09-83.jpg)
Let's keep the Debug Draw
check box on for now so we can see the layout graph overlayed in the scene
![Ut 09 85 Ut 09 85](dungeon-architect-docs/ut-09-85.jpg)
![Ut 09 95 Ut 09 95](dungeon-architect-docs/ut-09-95.jpg)
Keep Things Organized
When you build the dungeon, it clutters up the hierarchy
![Ut 09 86 Ut 09 86](dungeon-architect-docs/ut-09-86.png)
We'll configure it so that our dungeon is built under a certain game object and won't clutter the root.
Create a new empty game object and name it
DungeonItems
Reset the transform
Set it to static
Assign this game object to the DungeonSnapGridFlow gameobject's Pool Dungeon Scene Provider component
Click
Build Dungeon
again and our dungeon will be built under theDungeonItems
game object
Save Map
We've set up our dungeon game object. Save this scene somewhere, we'll revisit it later