I have two arrays in js scripts, both of which are defined to have the same size (e.g. ThisArray:float[ ] = new float[24000] ) but when I fill in some of the elements farther down in Awake() (e.g. ThisArray = [0,1,2,3,4… etc]) it seems to resize the array rather than just filling in the entries I’ve specified, because attempting to copy one array into the other returns an error saying that the lengths are not the same even though they were declared to have the same length. Is it resizing the arrays within the code?
I think this is javascript ? Let me be the annoying guy here and suggest you to use C#.
In regards to your issue it’s been years since I last wrote any javascript code, but if I remember correctly your ThisArray = [0,1,2,3,4… etc])
is the equivalent of declaring a new array with the size of whatever you put into the [ ].
What you have to do is the traditional set of values 1 by 1…
thisarray[0] = 0; and so on.
I don’t know if javascript has any other method of easily doing this, maybe others here know.