Reset Group Value

What it does: Reset the value of the given exposed parameter for the complete AudioMixerGroup of a given sound to the default value and returns an AudioError (see Possible Errors), showing wheter and how resetting the value of the given exposed parameter failed.

Possible Errors:

  • DOES_NOT_EXIST
  • MISSING_WRAPPER
  • MISSING_SOURCE
  • MISSING_CLIP
  • MISSING_MIXER_GROUP
  • MIXER_NOT_EXPOSED

How to call it:

  • SoundName is the name we have given the sound we want to reset the AudioMixerGroup parameter on
  • ExposedParameterName is the name we have given the exposed parameter on the AudioMixer
string soundName = "SoundName";
string exposedParameterName = "Volume";

AudioError error = am.ResetGroupValue(soundName, exposedParameterName);
if (error != AudioError.OK) {
    Debug.Log("Resetting AudioMixerGroup exposed parameter with the name " + exposedParameterName + " on the sound called: " + soundName + " failed with error id: " + err);
}
else {
    Debug.Log("Resetting AudioMixerGroup exposed parameter with the name " + exposedParameterName + " on the sound called: " + soundName + " succesfull");
}

When to use it: When you want to reset an exposed parameter (for example the volume or pitch) for the complete AudioMixerGroup the sound is connected to.

Remarks: See AudioMixer.ClearFloat for more details on what reset group value does.