Class Subtitler
[RequireComponent(typeof(UIDocument))]
public class Subtitler : MonoSingleton<Subtitler>
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourSubtitler
- 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
ISubtitleEntryEntry containing the subtitle data
audioSource
AudioSourceAudioSource 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
SubtitleSequenceDataSequence to be played
audioSource
AudioSourceAudioSource 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
intId of the session to hide