Description
The DefaultMixer
property of the SoundEvent
class specifies the default audio mixer to be used when playing a sound if no specific mixer is provided at the time of playback. This ensures that the sound is processed through a predefined audio path, allowing for consistent audio effects and volume control.
Usage
To use the DefaultMixer
property, you can access it directly from an instance of the SoundEvent
class. This property is useful when you want to ensure that a sound is played with a specific audio configuration without needing to specify the mixer each time the sound is played.
Example
// Example of accessing the DefaultMixer property
SoundEvent mySoundEvent = new SoundEvent();
Audio.MixerHandle mixer = mySoundEvent.DefaultMixer;
// Use the mixer handle to configure or play sounds
// Example: Play a sound with the default mixer
mySoundEvent.Play(mixer);