Runtime Dungeons
Setup Runtime Build Script
Dungeon Architect can build dungeons at runtime, so you can have a new dungeon everytime you play
You do this by calling the Build()
function on the Dungeon component
Create a new C# script anywhere in the project window


Open the script for editing
Here, we've provided a public attribute named dungeon
of type Dungeon
. You'll need to import the DungeonArchitect namespace using DungeonArchitect;
Create a new GameObject and rename it to something appropriate


Reset the transform


Add our script to this game object


Notice the Dungeon
parameter is exposed. This is because we made a public attributed named dungeon
in our code
Assign your dungeon reference here.

When you hit play, this dungeon will be built (since we call dungeon.Build()
in the Start
method)


Randomize Dungeon
You might want to have a different dungeon everytime you play
You do this by setting the seed parameter in the dungeon configuration before calling Build()