We can set a seed value for any dungeon to recreate that dungeon. There is a simple way to test this as well. In the DungeonManager.cs
file, add the line Random.seed = 1;
to the top of the definition of the StartDungeon
function.
Now return to the Unity Editor and play the game. Enter a dungeon and take a screenshot of the overview. Then, end the game and play again. Enter a dungeon and compare its overview to that of the screenshot. You will see that they have the exact same shape.
This is how we can destroy an entire randomly generated dungeon, yet return to it at a later time. You can adapt this line of code for situations such as having a player return to a dungeon to complete a task. For now, you can comment this line out because we won't be using it for our game, but feel free to experiment.