IEnumerator RunProgressive() { _generator.Reset(Seed); if (PatternGenerator.BoundaryPattern is Pattern <GameObjectTile> boundPattern) { _generator.SetBoundaryPattern(boundPattern); } foreach (var pos in _generator.RunProgressive()) { var tile = _generator.ChunkStates[pos.x, pos.y, pos.z].Pattern.Chunk; _tilemap.SetTile(pos + Bounds.min, tile); yield return(null); } }
IEnumerator GenerateProgressive() { _generator.Reset(Seed); yield return(null); foreach (var collapsedChunk in _generator.RunProgressive()) { var pos = Bounds.min + collapsedChunk; var tile = _generator.ChunkStates[collapsedChunk.x, collapsedChunk.y, collapsedChunk.z].Pattern.Chunk; _tilemap.SetTile(pos, tile); if (ShowSuperposition) { DrawSuperposition(); } yield return(null); } }