Quick answer: Unity SkinnedMeshRenderer.bones array setting throws on resize? Bones must match the mesh's bind pose count - cannot resize at runtime; rebake mesh or use a different rig.

Procedural rig: add a bone at runtime; SkinnedMeshRenderer rejects with array mismatch.

Rebake mesh

BakeMesh with new rig; assign. Heavy; correct.

Or use a fixed max bone count

Bind pose with 64 bones max; some inactive. Add/remove via active flag.

Use a different system

For dynamic rigs, GPU instancing with per-instance bone data. More work; designed for it.

“Skinned mesh has fixed bone count. Dynamic rigs need different architecture.”

If you need runtime rig changes, the architecture decision is upfront. Standard skinned mesh isn't for this.

Related reading