Change vertices colors without copying whole array


I have huge mesh (3.7 milion vertices) and I want to manipulate specific vertices of it (right now changing colors), but so far the only way to do this I’ve found is to copy whole array of colors32 or vertices, which is a pretty slow thing, considering I sometimes only want to change few hundred of vertices. Is there any better way to do it?

No, currently there is no way to lock the internal vertex buffer partially and only return a part of the data. If you have to modify the colors frequently i would recommend you cache the array and keep it. That way you don’t have to reallocate the array everytime and you don’t generate garbage. You can just modify your cached array and use SetColors32() on the same array.