Skip to content

AudioSource

0880 edited this page Apr 5, 2024 · 1 revision

Properties

  • audioClip: An AudioClip object representing the audio clip to be played.
  • playOnStart: A boolean indicating whether the audio should start playing when the entity is started.
  • loop: A boolean indicating whether the audio should loop.
  • volume: A float value representing the volume of the audio.
  • pitch: A float value representing the pitch of the audio.

Methods

play()

  • Starts playing the audio.

stop()

  • Stops playing the audio.

pause()

  • Pauses the audio.

getPlaybackPosition()

  • Returns the current playback position of the audio.

getDuration()

  • Returns the duration of the audio.

Clone this wiki locally