help with some instantiation code?

i am trying to instantiate some water using this code,

for (int i = 0; i < 5; i++)
        {
            for (int j = 0; j < 5; j++)
            {
                WaterRaycast((i * 100) +  (int) (meshObject.transform.position.x - 200), (j * 100) + (int) (meshObject.transform.position.z - 200));
            }
        }

this code spawns 25 water chunks in a square and this works fine. the problem is this code.

public void WaterRaycast(int waterNumX, int waternumZ)
    {
        bool istrue = false;
        GameObject water = Object.Instantiate(waterPrefab, new Vector3(waterNumX, waterPrefab.transform.position.y, waternumZ), meshObject.transform.rotation, meshObject.transform);
        for (int i = 0; i < 200; i++)
        {
            RaycastHit hit;
            if (i <= 50 && Physics.Raycast(new Vector3(water.transform.position.x + 50, water.transform.position.y, (water.transform.position.z + (i * 2)) - 50), Vector3.down, out hit, 100))
            {
                istrue = true;
                break;
            }
            else if(i <= 100 && Physics.Raycast(new Vector3(water.transform.position.x - 50, water.transform.position.y, (water.transform.position.z + ((i * 2) - 50) - 50)), Vector3.down, out hit, 100))
            {
                istrue = true;
                break;
            }
            else if (i <= 150 && Physics.Raycast(new Vector3((water.transform.position.x + ((i * 2) - 100) - 50), water.transform.position.y, water.transform.position.z + 50), Vector3.down, out hit, 100))
            {
                istrue = true;
                break;
            }
            else if (i <= 200 && Physics.Raycast(new Vector3((water.transform.position.x + ((i * 2) - 150) - 50), water.transform.position.y, water.transform.position.z - 50), Vector3.down, out hit, 100))
            {
                istrue = true;
                break;
            }

        }

         if (!istrue)
        {
            Object.Destroy(water);
        }
    }

what this is ment to do is delete the water if it does not detect ground under any of the edges(aka the water is underground). but this code deletes all the water spawned. whats the problem?

(info on the water) the water is an advanced Water4 asset that is a 100 unit square. if you need more info please ask.

I have figured out the problem and I now know that raycasts can only detect objects with collision mesh’s. i made collision meshs only appear around me when im walking through the area for performance reasons and because of that i need to find another way to optimize water.