TextStudioDialogueSource
[AddComponentMenu("Text Studio/Integration/Dialogue Source")][HelpURL("https://www.wetzold.com/tools/text-studio")]public sealed class TextStudioDialogueSource : MonoBehaviour, ITextStudioExternalTextSourceGeneric bridge for narrative, dialogue, subtitle, and speech-bubble systems. Third-party tools can call this component without taking a package dependency on their APIs; Text Studio remains responsible for reveal, tags, effects, and renderer output.
Methods
Section titled “Methods”
RegisterMarkupPreprocessor(ITextStudioMarkupPreprocessor)
Section titled “RegisterMarkupPreprocessor(ITextStudioMarkupPreprocessor)”public void RegisterMarkupPreprocessor(ITextStudioMarkupPreprocessor preprocessor)Registers a dialogue-local markup transform in invocation order.
Parameters
| Name | Type |
|---|---|
preprocessor |
TextStudio.ITextStudioMarkupPreprocessor |
UnregisterMarkupPreprocessor(ITextStudioMarkupPreprocessor)
Section titled “UnregisterMarkupPreprocessor(ITextStudioMarkupPreprocessor)”public bool UnregisterMarkupPreprocessor(ITextStudioMarkupPreprocessor preprocessor)Stops applying a previously registered dialogue-local markup transform.
Parameters
| Name | Type |
|---|---|
preprocessor |
TextStudio.ITextStudioMarkupPreprocessor |
Returns
System.Boolean: true when the processor was registered.
ShowLine(string)
Section titled “ShowLine(string)”public void ShowLine(string markup)Replaces the current line, preprocesses it, and starts reveal playback.
Parameters
| Name | Type |
|---|---|
markup |
System.String |
SetLine(string, bool)
Section titled “SetLine(string, bool)”public void SetLine(string markup, bool restartReveal)Replaces and preprocesses the current line with explicit reveal-restart policy.
Parameters
| Name | Type |
|---|---|
markup |
System.String |
restartReveal |
System.Boolean |
AppendToLine(string)
Section titled “AppendToLine(string)”public void AppendToLine(string markup)Preprocesses and appends markup while preserving the existing prefix’s reveal state.
Parameters
| Name | Type |
|---|---|
markup |
System.String |
ClearLine()
Section titled “ClearLine()”public void ClearLine()Clears source, processed line, and target output.
AdvanceOrSkip()
Section titled “AdvanceOrSkip()”public bool AdvanceOrSkip()Production dialogue “continue” behavior: first call completes the current reveal/wait, second call asks the owning dialogue system for the next line. Returns true only when the caller should advance externally.
Returns
System.Boolean
Constructors
Section titled “Constructors”
TextStudioDialogueSource()
Section titled “TextStudioDialogueSource()”public TextStudioDialogueSource()Properties
Section titled “Properties”
Target
Section titled “Target”public TextStudioText Target { get; set; }Returns
TextStudio.TextStudioText
ConfiguredTarget
Section titled “ConfiguredTarget”public TextStudioText ConfiguredTarget { get; }Returns
TextStudio.TextStudioText
SourceLine
Section titled “SourceLine”public string SourceLine { get; }Returns
System.String
CurrentLine
Section titled “CurrentLine”public string CurrentLine { get; }Returns
System.String
RestartRevealOnLine
Section titled “RestartRevealOnLine”public bool RestartRevealOnLine { get; set; }Returns
System.Boolean
OnLineShown
Section titled “OnLineShown”public UnityEvent<string> OnLineShown { get; }Returns
UnityEngine.Events.UnityEvent{System.String}
OnLineComplete
Section titled “OnLineComplete”public UnityEvent OnLineComplete { get; }Returns
UnityEngine.Events.UnityEvent
OnAdvanceRequested
Section titled “OnAdvanceRequested”public UnityEvent OnAdvanceRequested { get; }Returns
UnityEngine.Events.UnityEvent