Created Attachment Tag to all attachments

This commit is contained in:
MH261677 2024-02-01 18:48:15 +00:00
parent 8aa0b69436
commit 64fa82b2da

View File

@ -262,6 +262,7 @@ void ABaseWeaponClass::SetupSilencerAttachment(UStaticMesh* SilencerMesh)
FTransform EmptyTransform; FTransform EmptyTransform;
USceneComponent* SilencerAttachmentClass = Cast<USceneComponent>(AddComponentByClass(USilencerAttachmentClass::StaticClass(), false, EmptyTransform, false)); USceneComponent* SilencerAttachmentClass = Cast<USceneComponent>(AddComponentByClass(USilencerAttachmentClass::StaticClass(), false, EmptyTransform, false));
SilencerAttachmentClass->ComponentTags.Add(FName("AttachmentType"));
USkeletalMeshComponent* WeaponSkeletonMesh = FindComponentByClass<USkeletalMeshComponent>(); USkeletalMeshComponent* WeaponSkeletonMesh = FindComponentByClass<USkeletalMeshComponent>();
if (IsValid(SilencerAttachmentClass)) if (IsValid(SilencerAttachmentClass))
{ {