This is untested, but it should get you on the right path. You can replace "Platform" with whatever layer you end up putting your platform cubes in.
if (Input.GetMouseButtonDown(0)) {
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
// An arbitrary distance value. Increase or decrease this value, or you could set to Mathf.Infinity.
float distance = 100;
// Only perform these raycasts against this particular layer. Increase or decrease this value, or you could set to Mathf.Infinity.
int platformLayer = LayerMask.NameToLayer("Platforms");
if (Physics.Raycast(ray, out hit, distance, 1 << platformLayer)) {
// The ray hit something! hit will have lots of information about what was hit.
Debug.Log("Platform at position " + hit.transform.position);
}
}
This should get you the position of the particular platform cube that was hit. Of course, there are other ways to perform raycasts, but this is one example.
Note that in order for the Raycast to detect something, your objects need to have a collider attached.