Editor API Reference - v1.1.4
    Preparing search index...

    Type Alias SoundComponent

    Sound Component Properties.

    type SoundComponent = {
        distanceModel: string;
        enabled: boolean;
        maxDistance: number;
        pitch: number;
        positional: boolean;
        refDistance: number;
        rollOffFactor: number;
        slots: {
            [key: string]: {
                asset: number;
                autoPlay: boolean;
                duration: number;
                loop: boolean;
                name: string;
                overlap: boolean;
                pitch: number;
                startTime: number;
                volume: number;
            };
        };
        volume: number;
    }
    Index

    Properties

    distanceModel: string

    Algorithm to use for audio volume falloff. Can be: "inverse", "linear", "exponential".

    "linear"
    
    enabled: boolean

    Whether the component is enabled.

    true
    
    maxDistance: number

    Maximum distance at which audio falloff stops.

    10000
    
    pitch: number

    The pitch for audio playback. Multiplied with slot pitch values.

    1
    
    positional: boolean

    If true, audio is played as 3D sound.

    true
    
    refDistance: number

    Reference distance for reducing audio volume.

    1
    
    rollOffFactor: number

    Rate at which the audio volume falls off.

    1
    
    slots: {
        [key: string]: {
            asset: number;
            autoPlay: boolean;
            duration: number;
            loop: boolean;
            name: string;
            overlap: boolean;
            pitch: number;
            startTime: number;
            volume: number;
        };
    }

    Dictionary of sound slots, each controlling playback of an audio asset.

    volume: number

    Overall volume modifier for the component.

    1