Core Concepts: Flow Editor
What is the Flow Editor?
The Flow Editor is the visual graph interface associated with a Dungeon Flow Asset. It provides a graphical way to define the high-level structure and sequence of the dungeon's main path.
You access it by selecting a Dungeon Flow asset in your Project view and clicking the "Open Flow Editor" button in the Inspector.

Default dungeon flow
Understanding the Graph
The graph represents the intended progression through your dungeon's critical path:
- Nodes (Boxes): Represent specific, single tile placements along the main path.
- Start Node (Red): The fixed starting point of the dungeon. The first tile generated.
- Goal Node (Green): The fixed endpoint of the main path. The last tile generated.
- Intermediate Nodes (White): Optional nodes you can add to create distinct milestones within the dungeon flow.
- Line Segments (Lines): Represent the sequence of tiles generated between two connected nodes. The actual number of tiles in a segment depends on the overall dungeon
Length(set in the Dungeon Flow asset) and the relative visual length of the segments in the editor.
Interacting with the Flow Editor
- Selecting Elements: Click on a Node or a Line Segment in the graph. The Unity Inspector window will update to show the configuration options specific to that selected element.
- Adding Nodes: Right-click anywhere along a Line Segment. This will insert a new Intermediate Node at that point.
- Splitting Lines: Right-click anywhere along a Line Segment. This will split the segment at that point. This is how you create more complex flows with multiple distinct sections.

Right-clicking to add a new node or split a line
Configuring Nodes and Lines
The real power comes from configuring what happens at each stage:
Selecting a Node (Start, Goal, or Intermediate)
When a Node is selected, the Inspector allows you to configure:
- Label: A cosmetic name for the node in the editor (doesn't affect generation).
- Tile Sets: Assign one or more Tile Sets here. DunGen will randomly select a single tile from one of these assigned sets to place at this specific node location.
- Straighten Chance: An optional override to determine how much the path should be straightened. If the checkbox is unchecked, the default setting is used from the Dungeon Flow Asset
- Keys / Locks: Assign specific Keys or Locks to be placed within this single node tile. (Requires Lock & Key System setup).
- Lock Placement: (Nodes only) Specify where on the node's tile a lock should be placed (e.g., only on its entrance doorway).
Selecting a Line Segment
When a Line Segment is selected, the Inspector allows you to configure:
- Archetypes: Assign one or more Archetypes here. DunGen will use the rules (branching, Tile Sets specified within the Archetype) defined in one of the assigned Archetypes to generate the sequence of tiles along this segment. If multiple Archetypes are listed, one is chosen randomly per segment.
- Keys / Locks: Assign Keys or Locks to be placed randomly somewhere along the tiles generated for this line segment. (Requires Lock & Key System setup).
- Count: (Locks on Lines only) Specify how many instances of the listed lock type should be placed along this segment.
Example: Multi-Stage Dungeon
By adding intermediate nodes, you can create flows like this:

Multi-Stage dungeon flow
This graph tells DunGen:
- Start with a tile from the "Start" Node's Tile Set(s).
- Generate a sequence of tiles using the rules from the first Line Segment's Archetype(s).
- Place a specific tile from the "MiniBoss" Node's Tile Set(s).
- Generate the next sequence using the second Line Segment's Archetype(s).
- Place a specific tile from the "Boss" Node's Tile Set(s).
- Place the final tile from the "Goal" Node's Tile Set(s).
Why Use the Flow Editor?
The Flow Editor provides a clear, visual way to:
- Define the overall progression of your dungeon's main path.
- Break the dungeon into distinct sections with different themes or rules (using different Archetypes on lines).
- Place specific "milestone" rooms or tiles at key points (using Nodes).
- Integrate systems like Locks & Keys at specific structural points.
It translates your high-level design intent into concrete instructions for the DunGen generator.