Cluster Creator Kit Script Reference
    Preparing search index...

    Interface ApiAudioItem

    A handle to manipulate audio.

    interface ApiAudio {
        volume: number;
        attach(subNode: SubNode): void;
        attachToRoot(): void;
        play(): void;
        stop(): void;
    }
    Index

    Properties

    Methods

    Properties

    volume: number

    A property representing the volume of the audio. This property cannot be accessed at the top level of the script.

    The default is 1. The volume can be a number between 0 and 2.5.

    Methods

    • Set the spatial origin of the audio's positional playback to the specified SubNode.

      By default, the audio's spatial origin is the item's root position.
      If a non-existent SubNode is specified, the audio's spatial origin will be set to the item's root position.

      Parameters

      Returns void

    • Set the spatial origin of the audio's positional playback to the item's root position.

      Returns void

    • Plays the audio.

      When called against an audio already in playback, the playback will stop, then restart from the beginning.

      Returns void

    • Stops the audio.

      Returns void