unity change array size via script code example Example: change array size in unity GameObject[] temp = new GameObject[newSize];