RealDocs

UAudioComponent::SetAttenuationSettings

function Engine Blueprint Since unknown
#include "Components/AudioComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintSetter

Description

Assigns the USoundAttenuation asset this component's sound will use for attenuation.

Caveats & Gotchas

  • This is the BlueprintSetter for AttenuationSettings — Blueprint's AttenuationSettings pin calls this automatically, so C++ code that wants matching behaviour should call it directly rather than assigning the property.
  • Like the property itself, this only affects sounds that start playing after the call; it does not retroactively modify an already-active sound instance.

Signature

void SetAttenuationSettings(USoundAttenuation* InAttenuationSettings)

Parameters

Name Type Description Default
InAttenuationSettings USoundAttenuation* The attenuation asset to assign to this component.

Return Type

void

Example

Swap attenuation asset via setter C++
AudioComp->SetAttenuationSettings(IndoorAttenuation);
AudioComp->Play();

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.