Dungeon Architect for Unity 1.20 Help

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

Rename it to GameItemTheme

Ut 09 71

Setup Dungeon Game Object

  1. Create a new scene and drop in a DungeonSnapGridFlow prefab from Assets > CodeRespawn > DungeonArchitect > Prefabs

    Ut 09 72
  2. Select the DungeonSnapGridFlow game object and inspect the properties

    Ut 09 73
    Ut 09 74

    We'll assign the three assets we've created earlier

  3. Assign the GameItemTheme create created above

    Ut 09 75
  4. Assign the Snap Grid Flow Graph

    Ut 09 76
  5. Assign the Module Database

    Ut 09 77

Build Dungeon

Select the DungeonSnapGridFlow game object and click Build Dungeon

Ut 09 78
Ut 09 79
Ut 09 80

Change the seed and click build again to get a different dungeon

Ut 09 81
Ut 09 82

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 83

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 95

Keep Things Organized

When you build the dungeon, it clutters up the hierarchy

Ut 09 86

We'll configure it so that our dungeon is built under a certain game object and won't clutter the root.

  1. Create a new empty game object and name it DungeonItems

    Ut 09 87
    Ut 09 88
  2. Reset the transform

    Ut 09 89
  3. Set it to static

    Ut 09 91
  4. Assign this game object to the DungeonSnapGridFlow gameobject's Pool Dungeon Scene Provider component

    Ut 09 90
  5. Click Build Dungeon again and our dungeon will be built under the DungeonItems game object

Save Map

We've set up our dungeon game object. Save this scene somewhere, we'll revisit it later

Last modified: 24 January 2024