UAudioComponent::AutoAttachSocketName
#include "Components/AudioComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Socket on AutoAttachParent that this component attaches to when it activates, if bAutoManageAttachment is true.
Caveats & Gotchas
- • Only takes effect when bAutoManageAttachment is enabled — the EditCondition hides it in the Details panel otherwise, and setting it with auto-attach off has no effect.
- • An empty (NAME_None) value attaches to the parent's root rather than a named socket, which is easy to miss when a socket name is misspelled — the component silently falls back to root attachment instead of erroring.
- • The socket is looked up on AutoAttachParent at activation time, not registration time, so changing AutoAttachParent and this socket name together right before Activate() works, but changing them mid-playback does not re-attach.
Signature
FName AutoAttachSocketName Example
Auto-attach a footstep sound to a foot socket C++
AudioComponent->bAutoManageAttachment = true;
AudioComponent->AutoAttachParent = CharacterMesh;
AudioComponent->AutoAttachSocketName = TEXT("foot_l");
AudioComponent->Play(); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?