Trying to add a mesh parented to an armature to another instance of the same armature

So I have my base model/rig, and from that model I created prefabs which are basically copies of the original with different clothes toggled on or off.

I just added a new hair-mesh to the base model/rig. I want to add this new hair mesh to some of my prefabs, so what I did was

  1. drag a whole new copy of the original rig, LowPolyModel, into the prefab, Cashier

  2. right clicked and unpacked the new copy of LowPolyModel completely

  3. pulled over the two new hair meshes from LowPolyModel onto Cashier, updated the root bone to use the root bone of Cashier and then deleted copied instance of LowPolyModel from the prefab

After step three, the hair meshes disappear. The game objects are there, but the meshes are invisible. I suspect that these game objects or the skinned mesh renderer is still referencing something from the now deleted LowPolyModel instance.

It also seems like I can’t add the mesh manually with a new gameobject/skinned mesh renderer. There’s another step that I’m either missing or isn’t in the inspector.

Does anyone know how I can go about doing this? I rather not have to re-do my entire prefab every time I add new hair or clothes.

Thank you.

Got it:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 public class ReassignBoneWeigthsToNewMesh : MonoBehaviour
     public Transform newArmature;
     public string rootBoneName = "Hips";
     public bool PressToReassign;
     void Update()
         if (PressToReassign)
         PressToReassign = false;
     // [ContextMenu("Reassign Bones")]
     public void Reassign()
         if (newArmature == null) {
             Debug.Log("No new armature assigned");
         if (newArmature.Find(rootBoneName) == null) {
             Debug.Log("Root bone not found");
         Debug.Log("Reassingning bones");
         SkinnedMeshRenderer rend = gameObject.GetComponent<SkinnedMeshRenderer>();
         Transform[] bones = rend.bones;
         rend.rootBone = newArmature.Find(rootBoneName);
         Transform[] children = newArmature.GetComponentsInChildren<Transform>();
         for (int i = 0; i < bones.Length; i++)
             for (int a = 0; a < children.Length; a++)
                 if (bones*.name == children[a].name) {*

bones = children[a];

rend.bones = bones;