USoundAttenuation
#include "Sound/SoundAttenuation.h" Description
A data asset wrapping FSoundAttenuationSettings that controls how a sound's volume, spatialization, air absorption, reverb send, and occlusion change with listener distance. Assign to UAudioComponent or USoundBase.
Caveats & Gotchas
- • Attenuation settings are only applied to new Active Sound instances — changing UAudioComponent::AttenuationSettings while it is playing has no effect until the next Play() call.
- • bEnableOcclusion runs a line trace per OcclusionCheckInterval seconds per playing sound instance. Disable it for sounds that are never occluded to save CPU.
- • NonSpatializedRadiusStart/End blend a 3D source towards a 2D sound within that distance range, useful for sounds that should be heard clearly regardless of angle when the player is nearby.
Example
Assign an attenuation asset to a component C++
MyAudioComp->AttenuationSettings = MyAttenuationAsset;
MyAudioComp->Play(); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?