UAudioComponent::BP_GetAttenuationSettingsToApply
#include "Components/AudioComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Blueprint-callable wrapper that copies the effective attenuation settings for this component into OutAttenuationSettings. Returns false, with OutAttenuationSettings left at default values, if no attenuation settings apply.
Caveats & Gotchas
- • Copies the entire FSoundAttenuationSettings struct by value, which is relatively large — avoid calling this every tick from Blueprint.
- • In Blueprint the node appears as "Get Attenuation Settings To Apply"; the BP_ prefix and ScriptName override are C++-side naming only.
Signature
bool BP_GetAttenuationSettingsToApply(FSoundAttenuationSettings& OutAttenuationSettings) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| OutAttenuationSettings | FSoundAttenuationSettings& | Receives a copy of the effective attenuation settings if any apply. | — |
Return Type
bool Example
Reading attenuation settings from Blueprint-callable C++ C++
FSoundAttenuationSettings OutSettings;
if (AudioComponent->BP_GetAttenuationSettingsToApply(OutSettings))
{
UE_LOG(LogTemp, Log, TEXT("Falloff distance: %f"), OutSettings.FalloffDistance);
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?