Generating a cube with code positions are off

Hi everyone i am trying to accomplish the following,
i have a an array with the following information Level(
level = [1,2,3,4];

i would like to make a 2x2 cube from this

[1,2]

[3,4]

The following code will generate a 2x2 square with textures 1234 except the order in which it comes out on screen is 4,2,3,1 instead of 1,2,3,4 for the life of me i cant figure this out… maybe i should go to bed. Any help will be apreaciated.

    var level = [1,2,3,4];
    var iNoRow = 2;
    var iNoCol = 2;
    var iCount = 0;
    
    for (var x = 0; x < iNoRow; x++) {
       for (var y = 0; y < iNoCol ; y++) {
                    var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
                    cube.transform.position  = Vector3 (x,y, 0);
                    myNewTexture2D = Resources.Load(level[iCount],Texture2D);
                    cube.renderer.material.mainTexture = myNewTexture2D;
                    iCount++;
                }
            }

switch your x and y…
cube.transform.position = Vector3 (x,y, 0);

should be:
cube.transform.position = Vector3 (y, x, 0);