had a strange thing happen in Unity 18.1.6f1 two int arrays seemed to be duplicates of each other and when accessing the first the second would also update with the same ints even though i never set it directly, this ISN’T the behaviour I was expecting, is this normal?
public int[] playerCoords = { 0, 1 };
public int[] playerCoordsInit = { 0, 1 };
void Start()
{
playerCoords = playerCoordsInit;
}
I got around this by changing to the following:
void Start()
{
playerCoords[0] = playerCoordsInit[0];
playerCoords[1] = playerCoordsInit[1];
}
Literally no idea why It would be doing this?!