public override Tile[,] GetTiles(GeneratorContext context) { Tiles = new Tile[Width, Height]; MaxDistance = (int)Math.Round(From.DistanceTo(To) * (Complexity + 1)); UnityEngine.Debug.Log(MaxDistance); if (!FindPath(context, From, To)) { UnityEngine.Debug.Log("Unable to complete ConnectionRegion."); } // Fill in the rest with walls Tiles.Iterate((x, y, tile) => { if (tile == null) { Tiles[x, y] = new Tile(new DungeonWallFeature()); } }); return(Tiles); }