void DumpBiomeTree(BiomeSwitchNode node, int depth = 0) { Debug.Log("node at depth " + depth + ": " + node); foreach (var child in node.GetChilds()) { DumpBiomeTree(child, depth + 1); } }
void DumpBuiltTree() { BiomeSwitchNode current = root; Debug.Log("built tree:"); DumpBiomeTree(root); string childs = ""; foreach (var child in current.GetChilds()) { childs += child + "(" + child.biome + ") | "; } Debug.Log("swicth line1: " + childs); childs = ""; foreach (var child in current.GetChilds()) { foreach (var childOfChild in child.GetChilds()) { childs += childOfChild + "(" + childOfChild.biome + ") | "; } } Debug.Log("swicth line2: " + childs); }