I\'ve heard that Unity supports 32-bit index buffer now. But when I try Unity 2018.1 I can\'t make it work.
I built meshes in code like this:
int
Mesh buffers are 16 bit by default. See Mesh-indexFormat:
Index buffer can either be 16 bit (supports up to 65535 vertices in a mesh), or 32 bit (supports up to 4 billion vertices). Default index format is 16 bit, since that takes less memory and bandwidth.
Without looking too closely at the rest of your code, I do note that you've not set a 32 bit buffer. Try:
mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;