2d array index out of range

When I try to access an index in the array which is clearly in the range of 4 and 6 it gives me the error saying its out of range. I does the same even if I don’t set 2,5 to 1

int[,] placementArray = new int[4, 6];

void Start()
{
    placementArray[2, 5] = 1;
    print(placementArray[2,5]);
}

Same code works for me. Maybe you can try to initialize that array in start. Something like this.

int[,] placementArray;
void Start()
{
placementArray = new int[4, 6];
placementArray[2, 5] = 1;
Debug.Log(placementArray[2, 5]);
}

i checked your code, it is working fine. no issue in the current code