I have a skinned mesh and I’d like to be able to recalculate its bounds after modifying its blendshape weight.
Here’s my method:
public IEnumerator ResizeMesh(int value)
{
var skinnedMesh = GetComponent<SkinnedMeshRenderer>();
var m = skinnedMesh.sharedMesh;
skinnedMesh.SetBlendShapeWeight(1, value);
skinnedMesh.BakeMesh(m);
yield return new WaitForEndOfFrame();
m.RecalculateBounds();
skinnedMesh.sharedMesh = m;
}
The mesh is resized correctly when setting the blendshape but the bounds of the mesh stay the same.
What am I missing?