Search Results for

    Show / Hide Table of Contents

    Class AudioChannel

    Displayable class that bind a mixer group to its stored volume.

    Inheritance
    object
    AudioChannel
    Namespace: GGL.Audio
    Assembly: GGL.dll
    Syntax
    [Serializable]
    public class AudioChannel

    Constructors

    | Edit this page View Source

    AudioChannel(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 Source

    Init(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.

    | Edit this page View Source

    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]

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX