Class AudioChannel
Displayable class that bind a mixer group to its stored volume.
Namespace: GGL.Audio
Assembly: GGL.dll
Syntax
[Serializable]
public class AudioChannel
Constructors
| Edit this page View SourceAudioChannel(AudioMixerGroup, string)
Create a channel from its output mixer.
Declaration
public AudioChannel(AudioMixerGroup channel, string volumeProperty = "")
Parameters
Type | Name | Description |
---|---|---|
AudioMixerGroup | channel | Output audio mixer. |
string | volumeProperty | Specify if different from channel name. |
Methods
| Edit this page View SourceInit(float)
Read the local storage to initialize the channel volume. This method is called once the component is enabled.
Declaration
public float Init(float defaultVolume = 1)
Parameters
Type | Name | Description |
---|---|---|
float | defaultVolume | Displayable class that bind a mixer group to its stored volume. |
Returns
Type | Description |
---|---|
float | Displayable class that bind a mixer group to its stored volume. |
Remarks
If not enabled, do not forget to call this method once the scene is loaded.
Set(float)
Set a new volume to channel and local storage
Declaration
public virtual void Set(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | Volume in range ]0;1] |