Assets/Examples/Scripts/ProceduralChunk.cs
/// <summary>
/// Completes the mesh generation (if that is still running) and starts calculating the densities
/// </summary>
Completes the mesh generation (if that is still running) and starts calculating the densities
Completes the mesh generation ( if that is still running ) and starts calculating the densities
public override void StartDensityCalculation()
        {
            MarchingCubesJobHandle.Complete();
            int3 worldPosition = Coordinate * ChunkSize;
            var job = new ProceduralTerrainDensityCalculationJob
            {
                Densities = Densities,
                offset = worldPosition,
                chunkSize = ChunkSize + 1, 
                proceduralTerrainSettings = World.ProceduralTerrainSettings
            };
            DensityJobHandle = job.Schedule(Densities.Length, 256);
        }
public override void StartDensityCalculation ( ) { MarchingCubesJobHandle . Complete ( ) ; int3 worldPosition = Coordinate * ChunkSize ; var job = new ProceduralTerrainDensityCalculationJob { Densities = Densities , offset = worldPosition , chunkSize = ChunkSize + 1 , proceduralTerrainSettings = World . ProceduralTerrainSettings } ; DensityJobHandle = job . Schedule ( Densities . Length , 256 ) ; }
Completes the mesh generation (if that is still running) and starts calculating the densities
Completes the mesh generation ( if that is still running ) and starts calculating the densities
// +1 because ChunkSize is the amount of "voxels", and that +1 is the amount of density points