- Home /
How can you ascyncronously modify mesh vertex data?
I have a very very large mesh (~50 million triangles), made from the new 32bit index meshes in 2017.03. I get a new one of these meshes over the network about once per second and filling in all the data takes about 800ms. I want to 'double buffer' my meshes so that one can be displayed as the next one is being prepared on a different thread, then once it's done being prepared, they can be swapped so the new one gets displayed and the old one is cleared, waiting for new data to come in. Right now I get an error at runtime whenever I try to modify my mesh on a separate thread, saying that GetComponent can only be called from the main thread. I even tried disabling the MeshRenderer, but that didn't help at all. Is there ANY way to multi-thread these mesh modifications? (I don't even care if it's super memory or processing intensive)