"Failed extracting collision mesh" for mesh generated on GPU

I’ve been attempting to modify this example project GitHub - keijiro/ComputeMarchingCubes: [Unity] GPU-optimized marching cubes isosurface reconstruction

I’m trying to repurpose it to build terrain. After the Update() method in Assets/NoiseField/NoiseFieldVisualizer.cs I want to set a MeshCollider’s sharedMesh to use the mesh that’s been generated.

All I’ve done is add a line after the mesh is set:

GetComponent<MeshCollider>().sharedMesh = GetComponent<MeshFilter>().sharedMesh;

Currently I get an error:

Failed extracting collision mesh because vertex at index 2817 contains a non-finite value (0.000000, -nan, 1.000000). Mesh asset path "" Mesh name ""

When I iterate over sharedMesh.vertices and log them to console, I get either (0, 0, 0) or (-431602100.00, -431602100.00, -431602100.00) for each vertex value. Presumably because the values haven’t been sent back to the CPU?

I have mesh cleaning enabled for the MeshCollider.

Is it possible to generate a mesh collider with a GPU-only mesh? Preferably without transferring the points back to the CPU.

Just as a note: I don’t care about cross-platform compatibility. I’m only targeting windows.

Thank you!