• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    AudioSource

    Inherits from:

    AudioSource is a component used to play sounds. You can assign an AudioClip to an AudioSource to control sound playback, adjust volume, change pitch, loop sounds, and manage spatial effects for 3D audio. Unity's AudioSource Documentation

    Properties

    bypassEffects

    boolean
    ClientOnly

    Bypasses applied effects, playing the original sound when true. Unity's AudioSource.bypassEffects Documentation

    bypassListenerEffects

    boolean
    ClientOnly

    Bypasses 3D spatialization effects when true, affecting volume and pitch directly. Unity's AudioSource.bypassListenerEffects Documentation

    bypassReverbZones

    boolean
    ClientOnly

    Allows bypassing Global Reverb Zones for direct sound play when true. Unity's AudioSource.bypassReverbZones Documentation

    clip

    ClientOnly

    Holds the AudioClip to be played, allowing for the assignment of sound to the AudioSource. Unity's AudioSource.clip Documentation

    dopplerLevel

    number
    ClientOnly

    Sets the amount of Doppler effect, changing sound frequency based on movement. Unity's AudioSource.dopplerLevel Documentation

    ignoreListenerPause

    boolean
    ClientOnly

    Allows the AudioSource to keep playing despite a global pause, when set to true. Unity's AudioSource.ignoreListenerPause Documentation

    ignoreListenerVolume

    boolean
    ClientOnly

    When true, AudioSource ignores global volume controls, playing audio at its own volume level. Unity's AudioSource.ignoreListenerVolume Documentation

    isPlaying

    boolean
    ClientOnly
    ReadOnly

    Indicates if the AudioSource is currently playing sound, useful for checking audio status. Unity's AudioSource.isPlaying Documentation

    isVirtual

    boolean
    ClientOnly
    ReadOnly

    Indicates whether the AudioSource is virtualized, which has minimal resource usage. Unity's AudioSource.isVirtual Documentation

    loop

    boolean
    ClientOnly

    When true, the audio clip will play indefinitely in a loop, useful for background music or repeating sounds. Unity's AudioSource.loop Documentation

    maxDistance

    number
    ClientOnly

    Defines the maximum distance where attenuation stops, setting the farthest point for audio volume reduction. Unity's AudioSource.maxDistance Documentation

    minDistance

    number
    ClientOnly

    Sets the minimum distance for the AudioSource to start attenuating, controlling volume over distance. Unity's AudioSource.minDistance Documentation

    mute

    boolean
    ClientOnly

    Mutes the AudioSource when true, stopping any sound from being played. Unity's AudioSource.mute Documentation

    panStereo

    number
    ClientOnly

    Controls the left and right stereo pan, aiding in achieving desired sound effects. Unity's AudioSource.panStereo Documentation

    pitch

    number
    ClientOnly

    Controls the speed of sound playback. Adjusting the pitch changes the sound's speed and pitch. Unity's AudioSource.pitch Documentation

    playOnAwake

    boolean
    ClientOnly

    Determines if the audio clip will start playing automatically when the script activates. Unity's AudioSource.playOnAwake Documentation

    priority

    number
    ClientOnly

    Determines the AudioSource's priority among others for managing active AudioSource objects and playback selection based on priority value. Unity's AudioSource.priority Documentation

    reverbZoneMix

    number
    ClientOnly

    Controls the mix of spatialized AudioSource into global reverb, enhancing audio depth. Unity's AudioSource.reverbZoneMix Documentation

    spatialBlend

    number
    ClientOnly

    Sets the level of 3D audio effect application on the audio playback. Unity's AudioSource.spatialBlend Documentation

    spatialize

    boolean
    ClientOnly

    Activates spatializer effect for immersive 3D audio when set to true. Unity's AudioSource.spatialize Documentation

    spatializePostEffects

    boolean
    ClientOnly

    Applies spatial effects to the AudioSource for enhanced audio experience when true. Unity's AudioSource.spatializePostEffects Documentation

    spread

    number
    ClientOnly

    Controls audio spread across speakers in 3D playback, affecting sound directionality. Unity's AudioSource.spread Documentation

    time

    number
    ClientOnly

    Sets or returns the current playback position in seconds, allowing for precise control over playback. Unity's AudioSource.time Documentation

    timeSamples

    number
    ClientOnly

    Allows setting and retrieving the playback position in PCM samples for precise audio timing. Unity's AudioSource.timeSamples Documentation

    volume

    number
    ClientOnly

    Manages the loudness of the audio playing through the AudioSource. Adjust this property to control volume levels. Unity's AudioSource.volume Documentation

    Methods

    Parameters

    index
    number

    Returns

    boolean
    number

    Pause

    ClientOnly

    Pauses the audio playback, allowing for later resumption from the same point. Unity's AudioSource.Pause Documentation

    Returns

    void

    Play

    ClientOnly

    Starts playing the assigned audio clip, allowing for sound playback control. Unity's AudioSource.Play Documentation

    Returns

    void

    Play

    ClientOnly

    Starts playing the assigned audio clip, allowing for sound playback control. Unity's AudioSource.Play Documentation

    Parameters

    delay
    number

    Returns

    void

    PlayClipAtPoint

    ClientOnly

    Plays an AudioClip at a specified world position, as a static method. Unity's AudioSource.PlayClipAtPoint Documentation

    Parameters

    The AudioClip to be played.

    position

    The world position where the AudioClip will be played.

    Returns

    void

    PlayClipAtPoint

    ClientOnly

    Plays an AudioClip at a specified world position, as a static method. Unity's AudioSource.PlayClipAtPoint Documentation

    Parameters

    The AudioClip to be played.

    position

    The world position where the AudioClip will be played.

    volume
    number

    Returns

    void

    PlayDelayed

    ClientOnly

    Plays the assigned audio clip after a delay, useful for timed sound effects. Unity's AudioSource.PlayDelayed Documentation

    Parameters

    delay
    number

    The delay time in seconds before the audio clip starts playing.

    Returns

    void

    PlayOneShot

    ClientOnly

    Plays an audio clip once on demand, ignoring the AudioSource's regular clip. Unity's AudioSource.PlayOneShot Documentation

    Parameters

    The audio clip to play once.

    Returns

    void

    PlayOneShot

    ClientOnly

    Plays an audio clip once on demand, ignoring the AudioSource's regular clip. Unity's AudioSource.PlayOneShot Documentation

    Parameters

    The audio clip to play once.

    volumeScale
    number

    Returns

    void

    PlayScheduled

    ClientOnly

    Schedules audio clip playback at a precise time, aiding in synchronized audio events. Unity's AudioSource.PlayScheduled Documentation

    Parameters

    time
    number

    The time in seconds when the audio clip will start playing.

    Returns

    void

    Schedules a stop time for audio clip playback, useful for precise audio event control. Unity's AudioSource.SetScheduledEndTime Documentation

    Parameters

    time
    number

    The scheduled end time in seconds for the audio clip.

    Returns

    void

    Schedules the start time for audio clip playback, organizing audio in precise manner. Unity's AudioSource.SetScheduledStartTime Documentation

    Parameters

    time
    number

    The scheduled start time in seconds for the audio clip.

    Returns

    void

    Sets a float parameter for a spatializer effect attached to the AudioSource. Unity's AudioSource.SetSpatializerFloat Documentation

    Parameters

    index
    number

    The index of the parameter in the spatializer effect.

    value
    number

    The new value for the specified parameter.

    Returns

    boolean

    Stop

    ClientOnly

    Stops currently playing audio, useful for immediate sound halt. Unity's AudioSource.Stop Documentation

    Returns

    void

    UnPause

    ClientOnly

    Resumes paused audio playback from where it was stopped. Unity's AudioSource.UnPause Documentation

    Returns

    void

    Updated 9 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.