Audiocomponent

AudioComponent class

Audio component, used to play audio in the game

See AudioComponentData for the data schema used to create an audio component

Signature:

export declare class AudioComponent extends Component3D<AudioComponentData> 

Extends: Component3D<AudioComponentData>

Properties

PropertyModifiersTypeDescription
isPlayingreadonlybooleanReturns true if the audio is playing
loopbooleanIndicates whether the audio should start over when it is finished playing
playbackRatenumberReturns the audio playback rate
volumenumberReturns the audio volume, gos from O (muted) to 1 (max volume)

Methods

MethodModifiersDescription
pause()pause the audio
play()play the audio
stop()stop the audio, this will reset the audio to the beginning