Skip to content

Commit

Permalink
creating new WorldData before world generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Soskar1 committed Jul 27, 2023
1 parent 70ee513 commit df99f16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Assets/_Scripts/Core/World Generation/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@ private void Construct(TerrainGenerator terrainGenerator, StructureGenerator str
{
_terrainGenerator = terrainGenerator;
_structureGenerator = structureGenerator;

_worldData = new WorldData(_chunkLength, _chunkHeight, _worldSeed);
}

public async void GenerateChunks()
{
_renderDistance = (int)_renderDistanceSlider.value;
_worldSeed = _seedInputField.text.Length == 0 ? 0 : Int32.Parse(_seedInputField.text);
Debug.Log(_worldSeed);
_worldData = new WorldData(_chunkLength, _chunkHeight, _worldSeed);

await GenerateChunks(Vector3Int.zero);
}

Expand Down

0 comments on commit df99f16

Please sign in to comment.