In my application I do System.Array.Resize once per frame. Initially I set my arrays to a maximum possible size, and then Resize them to something smaller. In some cases it may be a lot smaller, in others it may be just a little smaller. It appears to me though that the more elements there are to resize, the longer it takes. Perhaps my observations are wrong, and that is why I am asking here.
In my application I do System.Array.Resize once per frame. Initially I set my arrays
Share
It should do yes, resizing involves allocating new memory to the size you want and copying the old array into the new one. The larger the array, the more to copy.
From MSDN:
Without knowing too much about the code, try using
List<T>to manage the list and the resizing you need to do and when you need to provide it to Unity, calllist.ToArray();.This will still create the array and copy it, but only once per frame.