Skinned Mesh Renderer -> Root Bone

Blender SIde:
I have a character wich has many body parts, so i decided to clone right side arm and leg to the left side.
Deleted all the vertices and parented / painted the weight on the mesh.

Unity side:
After importing the .fbx, i noticed that the generated SMR has the right side root on every part of the left members.

The problem with it, is that the bound will follow the wrong bone and therefore the wrong mesh, so parts of the body will desapear from camera at wrong moment (because the bound is out of the camera, but the mesh is not).
I could just manually adjust the bounds, but it feels like there should be a better solution to this.

e.g.: the missing arms in the following image.

I have searched the entire internet for an answer and found none, so i decide to create a way of not doing this manually.

First, i created a class to generate a button for my function on the inspector:

using UnityEngine;
using UnityEditor;

public class BoundRecalculatorMenu : Editor
    public override void OnInspectorGUI()

        BoundRecalculate script = (BoundRecalculate)target;

        if(GUILayout.Button("Recalculate Bounds")) {

then, i created a function to recalculate the bounds of my meshes:

using UnityEngine;

public class BoundRecalculate : MonoBehaviour
    GameObject target;

    public void calculate() {
        foreach( Transform child in target.transform ) {
            if(child.GetComponent<SkinnedMeshRenderer>() != null) {
                SkinnedMeshRenderer skinnedMeshRenderer = child.GetComponent<SkinnedMeshRenderer>();
                    skinnedMeshRenderer.rootBone = skinnedMeshRenderer.bones[skinnedMeshRenderer.sharedMesh.boneWeights[0].boneIndex0];
                    skinnedMeshRenderer.updateWhenOffscreen = true;
                    Bounds bounds = new Bounds();
                    Vector3 center =;
                    Vector3 extents = skinnedMeshRenderer.localBounds.extents;
           = center;
                    bounds.extents = extents;
                    skinnedMeshRenderer.updateWhenOffscreen = false;
                    skinnedMeshRenderer.localBounds = bounds;

what this does it to get the target object and find every single child that has a Skinned Mesh Renderer on it, then it get the bone the first bone of the first vertice ( not the most used bone, but the first, this may be a problem to some cases, but worked fine for my case ), and set it as root bone (this is needed so the bound will follow the character movement), last but not least, it sets the updatewhenoffscreen to on, so we can get the correct bound to that mesh, and then turn it off, setting the saved values to our finished bound.

I hope this come to be usefull to others, sorry for my bad english.