Hello, I am making a new unity 2d game. I am using perlin noise with random seeds in order to generate terrain and plants. Unfortunately, there are holes in my terrain when it is generated. Any suggestions? Pictures and script down below.

What it looks like (Unwanted Holes):

Public Variables I assigned in Inspector:

My World Generation Script:

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
using UnityEditor;
public class WorldGeneration : MonoBehaviour
{
public Tilemap tileMap;
public TileBase[] forestTiles;
public TileBase[] desertTiles;
public GameObject[] forestVegetation;
public GameObject[] desertVegetation;
public float perlin;
public int xOffset;
public int yOffset;
public float width;
public float height;
public float vegetationChance;
private void Start()
{
generateWorld();
}
public void generateWorld()
{
for (int x = xOffset; x <= width / 2; x++)
{
for (int y = yOffset; y <= height / 2; y++)
{
float random = Random.Range(0f, 1f);
float rainFall = Mathf.PerlinNoise(x + Random.value, y + Random.value);
float temperature = Mathf.PerlinNoise(x + Random.value, y + Random.value);
if (vegetationChance >= random)
{
generateWithVegetation(x, y, temperature, rainFall);
} else {
generateWithoutVegetation(x, y, temperature, rainFall);
}
}
}
}
void generateWithoutVegetation(int x, int y, float temperature, float rainFall)
{
perlin = Mathf.PerlinNoise(x + Random.value, y + Random.value);
if (temperature <= 0.75f && rainFall >= 0.15f) {
perlin *= forestTiles.Length - 1;
int tileNum = Mathf.RoundToInt(perlin);
tileMap.SetTile(new Vector3Int(x, y, 0), forestTiles[tileNum]);
} else if (temperature > 0.75f && rainFall < 0.15f) {
perlin *= desertTiles.Length - 1;
int tileNum = Mathf.RoundToInt(perlin);
tileMap.SetTile(new Vector3Int(x, y, 0), desertTiles[tileNum]);
}
}
void generateWithVegetation(int x, int y, float temperature, float rainFall)
{
perlin = Mathf.PerlinNoise(x + Random.value, y + Random.value);
if (temperature <= 0.75f && rainFall >= 0.15f) {
perlin *= forestTiles.Length - 1;
int tileNum = Mathf.RoundToInt(perlin);
tileMap.SetTile(new Vector3Int(x, y, 0), forestTiles[tileNum]);
GameObject plant = Instantiate(forestVegetation[Random.Range(0, forestVegetation.Length)], new Vector3(x + 0.5f, y + 5.15f, 0), Quaternion.identity);
plant.transform.parent = gameObject.transform.GetChild(0);
} else if (temperature > 0.75f && rainFall < 0.15f) {
perlin *= desertTiles.Length - 1;
int tileNum = Mathf.RoundToInt(perlin);
tileMap.SetTile(new Vector3Int(x, y, 0), desertTiles[tileNum]);
GameObject plant = Instantiate(desertVegetation[Random.Range(0, desertVegetation.Length)], new Vector3(x, y, 0), Quaternion.identity);
plant.transform.parent = gameObject.transform.GetChild(0);
}
}
}
```