How can I iterate through a Vector3 array, and for every Vector3, check to see whether there is a neighbouring one?

So for example if my array is (0,0,0), how can I check if (1,0,0) is there?

By neighbouring, I mean if they were 1,1,1 blocks, they would be touching. So an increase in 1 co-ordinate, but not the others.

Edit: Here is my new technique, using a 3D array. However, I get an error - ‘not a widening conversion.’ Could anyone shed any light on this?

```
var cubeSide : float;
var cubePrefab : GameObject;
var cube : int[,,];
function Start()
{
cube = new int[cubeSide,cubeSide,cubeSide];
Generate();
}
function Generate()
{
for(var x = 0; x < cubeSide - 1; x++)
for(var y = 0; y < cubeSide - 1; y++)
for(var z = 0; z < cubeSide - 1; z++)
{
var t = Random.value;
t = Mathf.Round(t);
cube[x,y,z] = t;
}
Build();
Check();
}
function Check()
{
for(var x = 0; x < cubeSide - 1; x++)
for(var y = 0; y < cubeSide - 1; y++)
for(var z = 0; z < cubeSide - 1; z++)
{
if(z != cube.Length - 1) if(cube[x,y,z + 1] == 1) print(""); //there is something at the front
if(z != 0) if(cube[x,y,z - 1] == 1) print(""); //there is something at the back
if(x != 0) if(cube[x - 1,y,z] == 1) print(""); //there is something at the left
if(x != cube.Length - 1) if(cube[x + 1,y,z] == 1) print(""); //there is something at the right
if(y != cube.Length - 1) if(cube[x,y + 1,z] == 1) print(""); //there is something above
if(y != 0) if(cube[x,y - 1,z] == 1) print(""); //there is something underneath
}
Build();
}
```