I’m working on a voxel terrain engine, and I generate chunk meshes at run time. But when the chunk is generated, I don’t need it in main memory at all. As long as it’s in VRAM, that’s all I need. However, the Unity docs say that all dynamic meshes can only be readable…is there a way around this? Meshes are definitely causing unnecessary memory overhead right now, and it’s kind of a show stopper.
The best you can do is to not use MarkDynamic. Beyond that, minimize the vertex data you use. There’s a big difference between using only vertex positions and also using colors, uv, uv2, normals, or tangents.
The naive approach would be to turn your entire voxel world into meshes all at once. This won’t work. A big part of a voxel engine is dynamic mesh management.