Description
The Transmission
property of the SoundHandle
class determines whether the sound should transmit through obstacles such as walls and doors. When set to true
, the sound will be able to pass through these barriers, allowing it to be heard on the other side. This can be useful for creating more realistic audio experiences in environments where sound should not be completely blocked by physical objects.
Usage
To use the Transmission
property, simply set it to true
or false
depending on whether you want the sound to transmit through obstacles:
SoundHandle soundHandle = new SoundHandle();
soundHandle.Transmission = true; // Enable transmission through walls
By default, this property may be set to false
, meaning the sound will not transmit through obstacles unless explicitly enabled.
Example
// Example of enabling sound transmission through walls
SoundHandle soundHandle = new SoundHandle();
// Enable transmission
soundHandle.Transmission = true;
// Check if transmission is enabled
if (soundHandle.Transmission)
{
// Sound will transmit through walls
// Additional logic here
}