- Home /
Question by
gandalfSourcer · Nov 20, 2012 at 09:53 PM ·
array2d array
werid array behavior
Hey guys, Im new to Unity, but not to programming. I was implementing my array while encountering strange behaviour.
public void addToBoard (Tile c)
{
c.setActive (false);
c.setColor (Color.red);
matrixBoard [0, 0] = c;
if(matrixBoard[0,0] == null){
print("IM and idiot");
}
}
Guess what it prints... :> yep, idiot thing. But WHY ? Why my array says it's empty,
while actually I can access my tile by matrixBoard [0, 0] .doSth().
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613084210im_/https://answers.unity.com/themes/thub/images/avi.jpg)