Description
The AirAbsorption
property of the SoundEvent
class determines whether the sound is subject to air absorption effects. When enabled, the sound will be absorbed by the air, which can affect how it is perceived over distance. This property is useful for simulating realistic audio environments where sound diminishes as it travels through the air.
Usage
To use the AirAbsorption
property, simply set it to true
or false
depending on whether you want the sound to be absorbed by air:
SoundEvent mySoundEvent = new SoundEvent();
mySoundEvent.AirAbsorption = true; // Enable air absorption
By default, this property is hidden in the UI if the UI
property is set to true
.
Example
SoundEvent mySoundEvent = new SoundEvent();
mySoundEvent.AirAbsorption = true; // Enable air absorption for realistic sound attenuation