Description
The Occlusion
property of the SoundHandle
class determines whether the sound can be occluded by geometry or other environmental factors. When set to true
, the sound will be affected by obstacles in the environment, potentially altering its volume or characteristics based on the occlusion settings.
Usage
To use the Occlusion
property, simply set it to true
or false
depending on whether you want the sound to be affected by occlusion. This can be useful in creating more realistic audio experiences where sounds are naturally blocked or altered by objects in the environment.
Example
// Create a new SoundHandle instance
SoundHandle sound = new SoundHandle();
// Enable occlusion for the sound
sound.Occlusion = true;
// Check if occlusion is enabled
if (sound.Occlusion)
{
// Perform actions knowing the sound is occluded
// For example, adjust other sound properties based on occlusion
}