Description
The OverrideOcclusion
property of the Sandbox.Audio.Mixer
class determines whether the mixer uses custom occlusion tags or inherits them from its parent. When set to true
, the mixer will apply its own occlusion tags, allowing for customized sound occlusion behavior. If set to false
, the mixer will use the occlusion settings of its parent, maintaining consistency with the parent mixer’s configuration.
Usage
To use the OverrideOcclusion
property, simply set it to true
or false
depending on whether you want the mixer to use its own occlusion tags or those of its parent. This property is useful when you need specific sound occlusion behavior for a particular mixer that differs from its parent.
Example
// Example of using the OverrideOcclusion property
Sandbox.Audio.Mixer myMixer = new Sandbox.Audio.Mixer();
// Set the mixer to use custom occlusion tags
myMixer.OverrideOcclusion = true;
// Alternatively, use the parent's occlusion settings
myMixer.OverrideOcclusion = false;