Assets/Examples/Scripts/ProceduralWorld.cs
/// <summary>
/// Instantiates a chunk at a coordinate
/// </summary>
/// <param name="chunkCoordinate">The chunk's coordinate</param>
/// <returns>The created chunk</returns>
Instantiates a chunk at a coordinate
Instantiates a chunk at a coordinate
private ProceduralChunk CreateChunk(int3 chunkCoordinate)
        {
            ProceduralChunk chunk = Instantiate(ChunkPrefab, (chunkCoordinate * ChunkSize).ToVectorInt(), Quaternion.identity).GetComponent<ProceduralChunk>();
            chunk.World = this;
            chunk.Initialize(ChunkSize, Isolevel, chunkCoordinate);
            return chunk;
        }
private ProceduralChunk CreateChunk ( int3 chunkCoordinate ) { ProceduralChunk chunk = Instantiate ( ChunkPrefab , ( chunkCoordinate * ChunkSize ) . ToVectorInt ( ) , Quaternion . identity ) . GetComponent < ProceduralChunk > ( ) ; chunk . World = this ; chunk . Initialize ( ChunkSize , Isolevel , chunkCoordinate ) ; return chunk ; }
Instantiates a chunk at a coordinate
Instantiates a chunk at a coordinate
The created chunk
The created chunk
chunkCoordinate
int3
The chunk's coordinate
The chunk ' s coordinate