Removing terrain tree at runtime not updating collider

I’m currently trying to remove a tree during runtime. I’m successfully removing the visual for the tree as well as the tree instance from the tree instance array, but the tree collider remains in the scene. I’ve also verified that the tree instance array for the terrain collider is being updated as well.

I’ve seen various “hacks” to get around this, but most of them don’t work:

terrainCollider.enabled = false;
terrainCollider.enabled = true;

This works, but takes a ridiculously long time for large terrains.

I’ve also seen

float[,] heights = terrainData.GetHeights(0, 0, 0, 0);
terrainData.SetHeights(0, 0, heights);

But that no longer works.

Either way, these are hacky. Ideally there would be a " dirty region" update I could do, but nothing seems to fit this use case. At this point, it feels like a shortcoming of the system.

Is there a better way to remove trees with their colliders?

It seems that enabling and disabling the collider is really the only way to refresh it, from what I’ve found. As for the long load on large terrains, stop using large terrains. There’s really no excuse now that Unity has a terrain neighbor system. With the extra terrain tools from the package manager, you can slice existing terrains into smaller chunks. Even before that, having enormous terrains was never good practice. The default 1x1km chunks is probably good for most games. If you update the collider often, consider smaller chunks, or refreshing in intervals during high activity.