Skip to content

Getting Started: Creating a Tile

Room Geometry

First, we'll create a very simple tile. In DunGen, a Tile is a segment of your dungeon, usually a room or corridor, that the dungeon generator will piece together to create the final layout.

Start by creating an empty GameObject and give it a descriptive name (e.g. "Basic Room). This GameObject will act as the container for our room's geometry and doorways, and we'll later turn it into a prefab.

Set up up the basic geometry of the room but leave gaps where you want doorways to be in the future. Not all of them will necessarily be used, so feel free to add more than you need.

⚠️ Important:
Doorways must be positioned on the edge of the Tile's Axis-Aligned Bounding Box (AABB).
See the Limitations section for more details.

Basic Room Geometry

Basic room geometry with gaps for doors

We have the shell of a room tile, now we need to tell DunGen how it should connect to other tiles. In the next step, we'll create doorways for our room.