A Unity implementation of a procedural level generator based on one or more agents moving in a grid. If there are one or more agents creating the level, a simple Depth-First Search is performed to check whether the level is connected and a simple corridor is generated between the agents if necessary. The size of the map, the sizes and probabilities of the rooms and whether or not rooms can overlap are all changeable parameters of the algorithm (part of the MultiAgentDigger prefab). The generator also automatically builds a navmesh of the generated map. New maps can be generated (with different parameters if you wish) while the scene is running.
For the Institute of Digital Games at the University of Malta, I created a tutorial in which students need to fill in the most important parts of the code. The tutorial can be found here: link. The solution can be found here: link and is probably better documented than the main code in this repo. Sorry for that.
The solution to the tutorial contains code for exporting the map to a csv-file of ASCI characters (basically 0,1 and 2 for the different floor levels).
The navmesh is automatically generated based on: https://github.com/Unity-Technologies/NavMeshComponents