Mesh bounds not updating size of mesh?

I’m trying to set a mesh to an exact size in Unity’s units. To do this I am trying:

MeshFilter headerMeshFilter = menuHeaderObj.GetComponent<MeshFilter>();
Mesh headerMesh = headerMeshFilter.mesh;
		
headerMesh.bounds = new Bounds(Vector3.zero, new Vector3(100, 550, 0));
headerMeshFilter.mesh = headerMesh;
headerMesh.RecalculateBounds();

But the mesh’s size does not change. Is there a step I am missing?

I had the same problem, but i just add the following to my generated mesh script file:

GetComponent(“MeshCollider”).enabled=false;
GetComponent(“MeshCollider”).enabled=true;

This do the magic, and it makes the new form of the new mesh work with the physics.