public CreateChunk ( ChunkPos, pos ) : TerrainChunk, | ||
pos | ChunkPos, | |
Résultat | TerrainChunk, |
void Start() { _terrain = GetComponent<Terrain>(); for (var x = -width / 2; x < width / 2; x++) for (var y = -depth / 2; y < depth / 2; y++) for (var z = -height / 2; z < height / 2; z++) { var chunk = _terrain.CreateChunk(new ChunkPos(x, y, z)); GenerateChunk(chunk); } for (var x = -width / 2; x < width / 2; x++) for (var y = -depth / 2; y < depth / 2; y++) for (var z = -height / 2; z < height / 2; z++) ((TerrainChunk)_terrain[new ChunkPos(x, y, z)]).UpdateMesh(); }