Hello,
We’ve been trying to get an editor utility working to create and attach subobjects to specific sockets on an actor, but could not get the subobjects to attach to the correct sockets. FSubobjectData->SetupAttachment is being used to achieve this, but after a closer inspection in the code, I noticed that the SocketName parameter is never used and instead uses NAME_None to set up the attachment. I’ve fixed this locally for now, but thought it was best that you were aware of the issue.
Thanks,
Bonita
In Subobjectdata.cpp line 578 -
`void FSubobjectData::SetupAttachment(FName SocketName, const FSubobjectDataHandle& AttachParentHandle)
{
USceneComponent* SceneComponentTemplate = Cast(GetMutableComponentTemplate());
if (!SceneComponentTemplate)
{
return;
}
FSubobjectData* AttachParentData = AttachParentHandle.GetData();
USceneComponent* AttachParent = AttachParentData ?
Cast(AttachParentData->GetMutableComponentTemplate()) :
SceneComponentTemplate->GetAttachParent();
SceneComponentTemplate->SetupAttachment(AttachParent, NAME_None);
if(USCS_Node* SCS_Node = GetSCSNode())
{
SCS_Node->Modify();
SCS_Node->AttachToName = NAME_None;
}
}`