Hello,
I've been experimenting with modifying a Mesh object's uv variable (type: Vector2[]), and I've only been able to make changes to the array via another object:
// Works fine, causes the values in mesh.uv to be changed.
Vector2[] temp = mesh.uv;
DoSomethingToParameter(temp);
mesh.uv = temp;
When I try to modify mesh.uv's elements directly, nothing happens:
DoSomethingToParameter(mesh.uv); // No effect.
Anyways, having to replace the entire array causes all sorts of garbage, requiring the GC to always need to Collect(), which ultimately results in frame rate dips (especially on mobile devices)...
Any way to get around this "messy" process? Or should I just keep the mesh uv modifications to the initialization phase of my scenes?
↧