RealDocs

UAudioComponent::AutoAttachScaleRule

property Engine Blueprint Since 4.0
#include "Components/AudioComponent.h"
Access: public Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite

Description

Controls how this component's scale is handled when it auto-attaches to AutoAttachParent, if bAutoManageAttachment is true.

Caveats & Gotchas

  • Only takes effect when bAutoManageAttachment is enabled.
  • Scale has no direct audio effect on its own, but is inherited by attenuation shapes and cone visualizations if the component's attenuation settings are scale-dependent, so KeepWorld is usually the safer default to avoid unexpectedly shrinking a sound's attenuation radius.

Signature

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Attachment, meta = (EditCondition = "bAutoManageAttachment"))
EAttachmentRule AutoAttachScaleRule;

Example

Snap to the socket on auto-attach C++
AudioComponent->bAutoManageAttachment = true;
AudioComponent->AutoAttachLocationRule = EAttachmentRule::SnapToTarget;
AudioComponent->AutoAttachRotationRule = EAttachmentRule::SnapToTarget;
AudioComponent->AutoAttachScaleRule = EAttachmentRule::KeepWorld;

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.