# Can't Attach to Socket after Mesh Merge - packaged builds only

**URL:** <https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283>\
**Category:** Character & Animation\
**Tags:** sockets, merge-actors, unreal-engine, bug-report, packaging-projects, skeletalmesh, question\
**Created:** [August 6, 2020, 7:49am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283 "2020-08-06T07:49:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![HertzRat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HertzRat](https://forums.unrealengine.com/u/HertzRat)\
**Post date:** [August 6, 2020, 7:49am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/1 "2020-08-06T07:49:24Z")

</div>

I’m using the Mesh Merge from here: [http://ue4.su/en-US/Engine/Animation/WorkingwithModularCharacters/index.html](http://ue4.su/en-US/Engine/Animation/WorkingwithModularCharacters/index.html), with a few gaps filled in by an old stack overflow post I found.

Everything works perfectly in the editor, and almost everything works in packaged builds. My character’s weapon/shield sockets don’t seem to exist (or does it?) in the packaged game however. Whenever I equip something, it just goes to the base of the capsule (ie, sword/shield between feet).

I’ve spent more than a day reading source code and trying different things and I’m really stuck. Master pose wasn’t working because it didn’t like my active physics animations (head kept falling off).

edit: if I print the location of the sockets in question, its the same result as if i print the location of a non-existant socket: just the spot between the feet (probably the 0,0 of the capsule). If I print the names of every socket, the socket does appear however. If I print its parent’s name via the GetSocketBoneName node, it displays the correct bone, and the location of that bone does move according to the character’s movement. The socket just does not move.

---

<div class="post-metadata">

**Author:** ![BattlesForGlory2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BattlesForGlory2](https://forums.unrealengine.com/u/BattlesForGlory2)\
**Post date:** [August 27, 2020, 5:27pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/2 "2020-08-27T17:27:59Z")

</div>

In my project i save all sockets params to struct variable Attach meshes to bone name and set relative transform

---

<div class="post-metadata">

**Author:** ![PhroZenOne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PhroZenOne](https://forums.unrealengine.com/u/PhroZenOne)\
**Post date:** [September 17, 2020, 1:27pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/3 "2020-09-17T13:27:49Z")

</div>

Did you ever get to the bottom of this? Having the same issue where skeleton sockets are placed in the root after merging meshes.

---

<div class="post-metadata">

**Author:** ![HertzRat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HertzRat](https://forums.unrealengine.com/u/HertzRat)\
**Post date:** [September 18, 2020, 8:21am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/4 "2020-09-18T08:21:55Z")

</div>

I switched to master pose.

---

<div class="post-metadata">

**Author:** ![BearInATie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BearInATie](https://forums.unrealengine.com/u/BearInATie)\
**Post date:** [October 6, 2020, 1:26pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/5 "2020-10-06T13:26:48Z")

</div>

I ran into the exact same problem and found a proper fix; call USkeletalMesh::RebuildSocketMap() on the mesh you create from FSkeletalMeshMerge::DoMerge()

---

<div class="post-metadata">

**Author:** ![PhroZenOne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PhroZenOne](https://forums.unrealengine.com/u/PhroZenOne)\
**Post date:** [October 7, 2020, 11:53am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/6 "2020-10-07T11:53:11Z")

</div>

Awsome! That worked for me as well! Thank you very much!

---

<div class="post-metadata">

**Author:** ![BearInATie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BearInATie](https://forums.unrealengine.com/u/BearInATie)\
**Post date:** [October 7, 2020, 12:32pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/7 "2020-10-07T12:32:50Z")

</div>

Glad to hear it! Good luck!

---

<div class="post-metadata">

**Author:** ![Sylvain\_Gravel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sylvain\_Gravel](https://forums.unrealengine.com/u/Sylvain_Gravel)\
**Post date:** [October 31, 2020, 1:32pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/8 "2020-10-31T13:32:08Z")

</div>

Thanks for this!!!

---

<div class="post-metadata">

**Author:** ![Renardjojo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Renardjojo](https://forums.unrealengine.com/u/Renardjojo)\
**Post date:** [November 20, 2020, 1:19pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/9 "2020-11-20T13:19:04Z")

</div>

Perfect solution, exactly what I need ! You answere is better than other

---

<div class="post-metadata">

**Author:** ![unvermelih](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unvermelih](https://forums.unrealengine.com/u/unvermelih)\
**Post date:** [July 21, 2021, 7:21pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/10 "2021-07-21T19:21:45Z")

</div>

**BearInATie** can you share more details about how did you solve this? I’m stuck…

---

<div class="post-metadata">

**Author:** ![unvermelih](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unvermelih](https://forums.unrealengine.com/u/unvermelih)\
**Post date:** [July 21, 2021, 9:39pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/11 "2021-07-21T21:39:30Z")

</div>

Okay figured out and it worked! Thank you for that BearInATie!

BaseMesh-\>RebuildSocketMap();  
return BaseMesh;

---

<div class="post-metadata">

**Author:** ![timV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@timV](https://forums.unrealengine.com/u/timV)\
**Post date:** [September 28, 2021, 5:50pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/12 "2021-09-28T17:50:12Z")

</div>

Hi, I work with BP, my C++ skills are by all means non existent, I just copied the code and followed ue4’s tutorial on how to merge skeletal meshes, but I have the same problem and not the slightest clue on how to implement this fix, could someone show a screenshot of the code, or copy/paste it here, so that us, simple BP people like me can know how to implement it? Would appreciate it very much! 🙂

---

<div class="post-metadata">

**Author:** ![Sarlack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sarlack/32/1194542_2.png) [@Sarlack](https://forums.unrealengine.com/u/Sarlack)\
**Post date:** [October 11, 2021, 1:12am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/13 "2021-10-11T01:12:00Z")

</div>

timV

In case you didn’t figure the out yet.  
Like mentioned above you will paste code on around Line 123 in your mesh merge function library cpp file.

**BaseMesh-\>RebuildSocketMap();**

It should be pasted right above “return BaseMesh;”

---

<div class="post-metadata">

**Author:** ![TheFlow3k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheFlow3k](https://forums.unrealengine.com/u/TheFlow3k)\
**Post date:** [November 22, 2021, 10:40am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/14 "2021-11-22T10:40:56Z")

</div>

Thanks a lot! I will give it a try directly. Should be added to the official “modular characters” documentation of unreal engine.

---

<div class="post-metadata">

**Author:** ![timV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@timV](https://forums.unrealengine.com/u/timV)\
**Post date:** [November 23, 2021, 2:34pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/15 "2021-11-23T14:34:13Z")

</div>

apologies for the late reply. Thank you very much I will try it right away 😃

---

<div class="post-metadata">

**Author:** ![poiqwe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@poiqwe](https://forums.unrealengine.com/u/poiqwe)\
**Post date:** [July 3, 2022, 5:04pm UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/16 "2022-07-03T17:04:30Z")

</div>

you saved my life!  
from 2022 07

---

<div class="post-metadata">

**Author:** ![R38007](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@R38007](https://forums.unrealengine.com/u/R38007)\
**Post date:** [October 25, 2022, 1:26am UTC](https://forums.unrealengine.com/t/cant-attach-to-socket-after-mesh-merge-packaged-builds-only/469283/17 "2022-10-25T01:26:46Z")

</div>

Wondering if anyone here could help me.

I added the line  
BaseMesh-\> RebuildSocketMesh();  
before the line “return BaseMesh” as was suggested, but it hasn’t fixed the issue. I am wondering if it has something to do with the fact my bones are not properly applying to the mesh.
