How to efficiently change a few vertices in a big mesh?
I am trying to make a map editor for my game.
A medium sized map would have around 320k triagnles.
Two ways I found to modify the mesh at runtime are:
1) Get the ArrayMesh from the MeshInstance, modify it, delete the old surface, add the new one and assign the modified ArrayMesh to the MeshInstance.
2) Create a MeshDataTool from the surface, modify the mesh and commit to surface.
In both cases the final step of assigning/commiting the modified mesh takes most of the total time, close to a hundred ms. I tried running the modify methods in separate threads so it won't block/lag the UI, but that leads to weird glitches where the map flashes in and out of existence or the material is removed from the mesh all of a sudden.
Is there a way to do in place changes to meshes at runtime without having to reload the entire mesh every time?