Search Results for

    Show / Hide Table of Contents

    Class SoundEffect

    Represents a sound effect, including its name and associated AudioSource.

    Inheritance
    object
    SoundEffect
    Namespace: Music
    Assembly: cs.temp.dll.dll
    Syntax
    public class SoundEffect

    Constructors

    SoundEffect(string, AudioSource)

    Initializes a new instance of the SoundEffect class.

    Declaration
    public SoundEffect(string name, AudioSource audioSource)
    Parameters
    Type Name Description
    string name

    The name of the sound effect.

    AudioSource audioSource

    The AudioSource component for the sound effect.

    Fields

    audioSource

    The AudioSource component that plays the sound effect.

    Declaration
    public AudioSource audioSource
    Field Value
    Type Description
    AudioSource

    name

    The name of the sound effect.

    Declaration
    public string name
    Field Value
    Type Description
    string
    In This Article
    Back to top Example Unity documentation footer