Table of Contents

Class Subtitler

Namespace
Gasimo.Subtitles
Assembly
Gasimo.Subtitler.dll
[RequireComponent(typeof(UIDocument))]
public class Subtitler : MonoSingleton<Subtitler>
Inheritance
Object
Component
Behaviour
MonoBehaviour
Subtitler
Inherited Members

Methods

Awake()

Use this for initialization.

protected override void Awake()

PlaySubtitleEntry(ISubtitleEntry, AudioSource)

Plays a single line of subtitles on a given AudioSource

public int PlaySubtitleEntry(ISubtitleEntry entry, AudioSource audioSource)

Parameters

entry ISubtitleEntry

Entry containing the subtitle data

audioSource AudioSource

AudioSource to play through

Returns

int

Id of the session instance

PlaySubtitleSequence(SubtitleSequenceData, AudioSource)

Plays a sequence of SubtitleEntries on a given AudioSource

public int PlaySubtitleSequence(SubtitleSequenceData sequenceData, AudioSource audioSource)

Parameters

sequenceData SubtitleSequenceData

Sequence to be played

audioSource AudioSource

AudioSource to play through

Returns

int

Id of the session instance

RemoveOldest()

Removes and hides a active Subtitle Session with the oldest id.

public void RemoveOldest()

RemoveSubtitle(int)

Removes and hides a Subtitle session immediately.

public void RemoveSubtitle(int id)

Parameters

id int

Id of the session to hide