public void TileGenerator()
    {
        if (randomSeed)
        {
            seed = Random.Range(0, 100000);
        }
        noiseMap             = new float[mapSize, mapSize];
        float [,] falloffMap = FalloffGenerator.GenerateFalloffMap(mapSize);

        for (int y = 0; y < mapSize; y++)
        {
            for (int x = 0; x < mapSize; x++)
            {
                noiseMap[x, y] = NoiseMap.fBM(x, y, seed, scale, octaves, persistence);
            }
        }

        tilemap.ClearAllTiles();

        if (tilemode == Tilemode.LandscapeMap)
        {
            GenerateLandscape(noiseMap, falloffMap);
        }
        else if (tilemode == Tilemode.NoiseMap)
        {
            NoiseMapGenerator(noiseMap);
        }
        else if (tilemode == Tilemode.FalloffMap)
        {
            NoiseMapGenerator(falloffMap);
        }
        else if (tilemode == Tilemode.CaveGeneration)
        {
            GenerateCave();
        }
        RuleTileGenerator(dirtRuleTile);
    }