// Start is called before the first frame update protected override void LayerCreation() { if (SmoothingLayers == null) { SmoothingLayers = new List <CellularAutomataSmoothingLayer>(); CellularAutomataSmoothingLayer layer = new CellularAutomataSmoothingLayer(); layer.ChangeTreshold = 4; layer.encourageMapEdges = false; layer.lowerTresholdEqualsTo = false; layer.upperTresholdEqualsTo = false; SmoothingLayers.Add(layer); } Vector2Int buffer = new Vector2Int(Random.Range(mapBufferMin.x, mapBufferMax.x + 1), Random.Range(mapBufferMin.y, mapBufferMax.y + 1)); if (useRandomSeed) { layerData = CellularAutomata.GeneratedMap(mapSize, randomFillPercentage, buffer, SmoothingLayers); } else { layerData = CellularAutomata.GeneratedMap(mapSize, randomFillPercentage, buffer, SmoothingLayers, coverEdges, seed); } }