• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    AudioClip

    Inherits from:

    AudioClip serves as a container for audio data, including music, voiceovers, and sound effects. It offers properties and methods to access playback details like length, samples, channels, and frequency. AudioClip supports preloading, 3D audio, and background loading. Custom AudioClip instances can be created programmatically. Fundamental for auditory experiences in Unity projects, AudioClip documentation provides further details. Unity's AudioClip Documentation

    Properties

    channels

    number
    ClientOnly
    ReadOnly

    Represents the number of audio channels, such as 1 for mono or 2 for stereo. Unity's AudioClip.channels Documentation

    frequency

    number
    ClientOnly
    ReadOnly

    Denotes the sample rate of the clip in kHz, indicating the samples per second. Unity's AudioClip.frequency Documentation

    length

    number
    ClientOnly
    ReadOnly

    Returns the clip's duration in seconds, akin to a song's length. Unity's AudioClip.length Documentation

    loadInBackground

    boolean
    ClientOnly
    ReadOnly

    Specifies if the clip should load in the background, allowing gameplay to continue. Unity's AudioClip.loadInBackground Documentation

    preloadAudioData

    boolean
    ClientOnly
    ReadOnly

    Controls whether the audio data should be preloaded upon clip asset loading. Unity's AudioClip.preloadAudioData Documentation

    samples

    number
    ClientOnly
    ReadOnly

    Refers to the total number of audio samples within the clip. Unity's AudioClip.samples Documentation

    Methods

    LoadAudioData

    ClientOnly

    Initiates loading of the clip's audio data, particularly when 'preloadAudioData' is false. Unity's AudioClip.LoadAudioData Documentation

    Returns

    boolean

    True if data loading starts successfully.

    UnloadAudioData

    ClientOnly

    Unloads the clip's audio data from memory, aiding in efficient memory usage. Unity's AudioClip.UnloadAudioData Documentation

    Returns

    boolean

    True if data unloading begins successfully.

    Updated 12 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.