Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

YarnVoiceOverPresenter

presenter for playing voice over audio associated with dialogue lines. syncs audio playback with text display.
class_name YarnVoiceOverPresenter
extends YarnDialoguePresenter

Inherits from YarnDialoguePresenter

#Properties

#audio_base_path

var audio_base_path: String = "res://audio/dialogue/"

Type String

#audio_extension

var audio_extension: String = ".ogg"

Type String

#audio_player

var audio_player: AudioStreamPlayer

Type AudioStreamPlayer

#audio_player_2d

var audio_player_2d: AudioStreamPlayer2D

Type AudioStreamPlayer2D

#audio_player_3d

var audio_player_3d: AudioStreamPlayer3D

Type AudioStreamPlayer3D

#end_line_when_voice_complete

When the voice over finishes, ask the runner to end the line.
var end_line_when_voice_complete: bool = true

Type bool

#fade_out_time_on_interrupt

seconds; 0 = instant stop
var fade_out_time_on_interrupt: float = 0.05

Type float

#interrupt_on_new_line

var interrupt_on_new_line: bool = true

Type bool

#volume_db

var volume_db: float = 0.0

Type float

#wait_for_audio

var wait_for_audio: bool = true

Type bool

#wait_time_after_complete

seconds after audio finishes before signaling completion
var wait_time_after_complete: float = 0.0

Type float

#wait_time_before_start

seconds before starting playback
var wait_time_before_start: float = 0.0

Type float

#Signals

#voice_finished

signal voice_finished(line: YarnLine)

Parameters

#voice_started

signal voice_started(line: YarnLine, audio: AudioStream)

Parameters

#Methods

#on_dialogue_completed()

func on_dialogue_completed() -> void

#run_line(YarnLine, YarnCancellationToken)

func run_line(line: YarnLine, token: YarnCancellationToken = null) -> void

Parameters

Generated from Yarn Spinner for Godot GDScript 3.3.