Scripting / Audio
GameOptionsMenu_SoundSlider
UI component that bridges a Slider to a named AudioMixer parameter. Reads the current mixer value on Start to sync the slider position, then delegates all changes to SoundManager. Requires a Slider on the same GameObject.
Inspector Variables
| Field | Type | Description |
|---|---|---|
audioMixer | AudioMixer | The AudioMixer containing the parameter to control. Must be the same asset assigned to SoundManager. |
parameterName | string | Exact name of the exposed parameter (case-sensitive). Must match the name in the AudioMixer's Exposed Parameters list. |
Public Methods
| Method | Description |
|---|---|
SetValue(float value) | Forwards the new value to SoundManager.current.Set(parameterName, value). Wire to the Slider's OnValueChanged (Dynamic float) event in the Inspector. |
Setup guide
See Audio Setup in the Manual for the step-by-step walkthrough — exposing the mixer parameter, configuring the Slider range, and wiring OnValueChanged.