How do i make a realtime tiling??Help

Hello im trying to make a real time([ExecuteInEditMode]) tile maker that a public float can be edited in the inspector to increase and decrease amount of TIles but i cant seem to delete the previous 3Dobjects if you know what i mean

using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class floor : MonoBehaviour
{
    public Transform Tile;
    public float TslotsX;
    public float TslotsY;
    void FixedUpdate()
    {
            for (int x = 0; x < TslotsX; x++)
            {
                for (int y = 0; y < TslotsZ; y++)
                {
                    DestroyImmediate(prefab);
                    Instantiate(Tile, new Vector3(x * 1.0f, 0, y * 1.0f), Quaternion.identity);
                }
            }
    }
}

using UnityEngine;
using System.Collections;

public class TilePlacer : MonoBehaviour
{
	public GameObject TilePrefab;

	[SerializeField]
	private float TslotsX = 1f;
	[SerializeField]
	private float TslotsY = 1f;
	[SerializeField]
	private float tileStep = 1f;

	private void RemoveTiles()
	{
		GameObject[] oldTilesArray = new GameObject[transform.childCount];

		//Get an array of children; you can't destroy them by DestroyImmediate (transform.GetChild(i).gameObject) because their indexes will change every time you are destroying one
		for(int i = 0; i < transform.childCount; i++)
			oldTilesArray *= transform.GetChild(i).gameObject;*
  •  //Destroy them*
    
  •  foreach(GameObject oldTile in oldTilesArray)*
    
  •  	DestroyImmediate (oldTile);*
    
  • }*

  • [ContextMenu(“Place Tiles”)]*

  • private void PlaceTiles()*

  • {*

  •  //remove old tiles if there are any*
    
  •  RemoveTiles();*
    
  •  //Place new ones*
    
  •  for (int x = 0; x < TslotsX; x++)*
    
  •  {*
    
  •  	for (int y = 0; y < TslotsY; y++)*
    
  •  	{*
    
  •  		//Instantiate new tile and save a reference to it's Transform component*
    

_ GameObject tileInstance = Instantiate(TilePrefab, new Vector3(x * tileStep, 0, y * tileStep), Quaternion.identity) as GameObject;_

  •  		//Get this tile's transform component*
    
  •  		Transform tileTransform = tileInstance.GetComponent<Transform>();*
    
  •  		//Make this new tile a child of TilePlacer object for easier management*
    
  •  		tileTransform.parent = transform;*
    
  •  	}*
    
  •  }*
    
  • }*
    }