Use raycast to see if something else than terrain is under

Hi! I have a script that instantiates an object that I need to not instantiate if there already is something else than terrain where I instantiates. The most logical solution I think would be something using a raycast, although I’m not certain how I would check if there is something else than terrain where I instantiates…

Here is the instantiation code

if(Input.GetKeyDown(KeyCode.Mouse0)){
			Debug.Log ("Instantiating Windmill.");
			GameObject newObject;
			newObject = (GameObject) Instantiate(Object1, hit.point, Quaternion.Euler (0,120,0));	 
			Vector3 currentPosition = newObject.transform.position;	 
			currentPosition.y = currentPosition.y + 500.0f;	 
			newObject.transform.position = currentPosition;
		}

Thanks in advance!

So best would be to use a SphereCast from above the position you want heading downwards. If it hits something check whether it is the terrain by considering the RaycastHit collider’s tag or by using it to get the game object. If it isn’t the terrain then something else is there.