void CreateChunk(Vector3 offset) { TerrainChunk chunk = Instantiate(chunkPrefab, offset, Quaternion.identity).GetComponent <TerrainChunk>(); chunk.shape = shape; chunk.GenTerrain(); chunks.Add(chunk.CalculateChunkPos(), chunk); }
void CreateChunk(Vector3 offset) { TerrainChunk chunk = Instantiate(chunkPrefab, offset, Quaternion.identity).GetComponent <TerrainChunk>(); chunk.shape = shape; chunk.GenTerrain(); chunks.Add(chunk.CalculateChunkPos(), chunk); }