Assets/Examples/Scripts/ProceduralChunk.cs
/// <summary>
/// Sets the coordinate of this chunk and starts generating the and the mesh.
/// </summary>
/// <param name="coordinate">The new coordinate</param>
Sets the coordinate of this chunk and starts generating the and the mesh.
Sets the coordinate of this chunk and starts generating the and the mesh .
public void SetCoordinate(int3 coordinate)
        {
            Coordinate = coordinate;
            transform.position = coordinate.ToVectorInt() * ChunkSize;
            name = $"Chunk_{coordinate.x.ToString()}_{coordinate.y.ToString()}_{coordinate.z.ToString()}";
            _densityModifications.Clear();
            StartDensityCalculation();
            StartMeshGeneration();
        }
public void SetCoordinate ( int3 coordinate ) { Coordinate = coordinate ; transform . position = coordinate . ToVectorInt ( ) * ChunkSize ; name = $" Chunk_ { coordinate . x . ToString ( ) } _ { coordinate . y . ToString ( ) } _ { coordinate . z . ToString ( ) } " ; _densityModifications . Clear ( ) ; StartDensityCalculation ( ) ; StartMeshGeneration ( ) ; }
Sets the coordinate of this chunk and starts generating the and the mesh.
Sets the coordinate of this chunk and starts generating the and the mesh .
coordinate
int3
The new coordinate
The new coordinate