Created
July 19, 2019 16:16
-
-
Save AG-Dan/033ee8e7131ab34198aee5161d1d9a8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void AdjustSettingsAndGenerate(RuntimeDungeon runtimeDungeon) | |
{ | |
var dungeonFlowAsset = runtimeDungeon.Generator.DungeonFlow; | |
// Make a copy of the existing settings | |
var newDungeonFlow = Instantiate(dungeonFlowAsset); | |
// Adjust the number of instances of the first global prop in the list | |
newDungeonFlow.GlobalProps[0].Count = new IntRange(1, 3); | |
// Assign our new settings to the dungeon generator | |
runtimeDungeon.Generator.DungeonFlow = newDungeonFlow; | |
runtimeDungeon.Generate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment