UGameplayStatics::PlaySoundAttached never works if sound is less than 1 second in duration

Hi Kory,

just looped me in on this thread. We’re working to repro issue you describe but in mean time I have some insight into this that might help you.

For sounds shorter than 1.0 seconds, in USoundBase::IsAudibleSimple, GetMaxAudibleDistance() function result is based on your AttenuationSettings of sound (via USoundWave::GetMaxAudibleDistance override of USoundBase class) itself or optional override AttenuationSettings which is passed in to PlaySoundAttached function. It sounds like this optional settings is null in your case.

In both cases, though, properties of AttenuationSettings to check are FalloffDistance and AttenuationShapeExtents properties (which are both editable from editor).

It could definitely be case that there is a bug with AttenuationSettings so we are, as I said, looking to repro situation on our end. But in meantime, I recommend checking out what your attenuation settings are or set a breakpoint in USoundWave::GetMaxAudibleDistance() and see what’s going on there. If issue still persists, it would be helpful to know what those settings are and/or what your debugging says FAttenuationSettings::GetMaxDimension() is returning.

Finally, as a programmer, I deeply appreciate your detailed write up of issue! Thank you very much :slight_smile: