UAudioComponent::SetAttenuationOverrides
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintSetter
Description
Replaces the inline attenuation override struct used by this component when bOverrideAttenuation is true.
Caveats & Gotchas
- • Does not set bOverrideAttenuation to true for you — the values passed in are silently ignored during playback if that flag is still false.
- • Passing a default-constructed FSoundAttenuationSettings resets attenuation to engine defaults, not to whatever the previous AttenuationSettings asset specified.
Signature
void SetAttenuationOverrides(const FSoundAttenuationSettings& InAttenuationOverrides) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InAttenuationOverrides | const FSoundAttenuationSettings& | The full attenuation settings struct to apply as an inline override. | — |
Return Type
void Example
Apply overrides via setter C++
FSoundAttenuationSettings Overrides;
Overrides.FalloffDistance = 1500.f;
AudioComp->bOverrideAttenuation = true;
AudioComp->SetAttenuationOverrides(Overrides); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?