UAudioComponent::AttenuationSettings
#include "Components/AudioComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWriteBlueprintSetter
Description
A reusable USoundAttenuation asset that defines distance-based volume falloff and spatialization for this component's sound. Ignored when bOverrideAttenuation is true.
Caveats & Gotchas
- • Only takes effect when bOverrideAttenuation is false — if the component is switched to inline overrides, this asset reference is ignored entirely even though it stays assigned.
- • Changing this while a sound is already playing has no effect on the active instance; attenuation is only read when playback starts, so reassign it before calling Play, or use SetAttenuationSettings on the next play.
Signature
TObjectPtr<USoundAttenuation> AttenuationSettings Example
Assign an attenuation asset before playing C++
UAudioComponent* Audio = UGameplayStatics::SpawnSoundAttached(CueToPlay, RootComponent);
Audio->AttenuationSettings = FootstepAttenuation;
Audio->Play(); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?