public void Generate() { if (!PatternGenerator) { return; } _tilemap.ClearAllTiles(); PatternGenerator.ExtractPatterns(); _generator = new WFCGenerator <GameObjectTile>(Bounds.size, PatternGenerator.NeighborOffset, PatternGenerator.Patterns); StartCoroutine(RunProgressive()); }
public void Generate() { if (!TilemapPattern) { return; } // if(_generator is null) _tilemap.ClearAllTiles(); TilemapPattern.ExtractPatterns(); _generator = new WFCGenerator <TileBase>(Bounds.size.ToVector2Int().ToVector3Int(1), TilemapPattern.NeighborOffset, TilemapPattern.Patterns); foreach (var tilemap in _stateMaps) { tilemap.ClearAllTiles(); } RandomSeed(); StartCoroutine(GenerateProgressive()); // CoroutineRunner = new CoroutineRunner(GenerateProgressive()); }