DynamicBuffer Bug.


This line must be a bug!

Why do you say that?

DynamicBuffer.RemoveAtSwapBack have a bug in this line,it should be ((T)(basePtr + indexelemSize))=((T*)(basePtr+newLength*elemSize)).

1 Like

Yep. This caught me off guard when I upgraded to Unity 2020.1 and latest packages, since I had a custom extension method for DynamicBuffer.RemoveAtSwapBack(int). The new method took precedence, but didn’t work. I was pulling my hair out for a while over that.

Someone reported it here with a response from Unity: DynamicBuffer.RemoveAtSwapBack copy only byte size data.

1 Like