DungeonFlow is a fully procedural dungeon generator for Unity that instantly creates complex layouts with rooms, corridors, and interactive objects. With customizable parameters, real-time NavMesh support, and seamless editor integration, it accelerates development and delivers endless replayability.
⚙️ Technical Details – Features:
🏗️ Dungeon Generation
- Partitioning (BSP): Splits the dungeon into partitions, then generates rooms and corridors.
- Random Seed Support: Use fixed or random seeds for reproducible layouts.
📏 Dungeon Dimensions & Rooms
- Dungeon Size: Configurable dungeonWidth and dungeonHeight.
- Rooms: Control targetRoomCount, roomSpawnChance, min/maxRoomSize, roomPadding.
- Corridors: Adjustable corridorWidth.
🎨 Visuals
- Cell Size: World scaling per grid unit.
- Walls: Adjustable wallHeight and wallThickness.
- Materials: Separate floorMaterial and wallMaterial.
🎮 Game Elements
- Player Spawn: Automatically placed in the first room.
- Exit Spawn: Automatically placed in the last room.
🎲 Object Spawning
- Spawnable Objects List: Each prefab has min-max spawn count and Y offset.
- Random Placement: Objects spawn at random positions within rooms.
🧱 Mesh Building
- Floor Mesh + Wall Mesh generation.
- Adds mesh colliders and UV mapping for rendering.
🧭 Navigation
- NavMesh Baking: Automatically builds navigation mesh for AI pathfinding.
🧹 Dungeon Clearing
- ClearDungeon(): Removes meshes, player object, and NavMesh data.
🖼️ Editor Integration
- Custom Inspector: Adds buttons for Generate Dungeon and Clear Dungeon.
🖌️ Debug / Gizmos
- Partition & Room Gizmos: Draws partitions and rooms in the Scene view for debugging.