Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Class in Yarn.Unity
Inherits from DialoguePresenterBase
A Dialogue Presenter that presents lines of dialogue, using Unity UI elements.
Controls whether this Line View will automatically to the Dialogue Runner that the line is complete as soon as the line has finished appearing.
The amount of time after the line finishes appearing before automatically ending the line, in seconds.
The canvas group that contains the UI elements used by this Line View.
The game object that holds the characterNameText text field.
The TMPro.TMP_Text object that displays the character names found in dialogue lines.
The time that the fade effect will take to fade lines out.
The time that the fade effect will take to fade lines in.
The number of characters per second that should appear during a typewriter effect.
The TMPro.TMP_Text object that displays the text of dialogue lines.
Controls whether the lineText object will show the character name present in the line or not.
Controls whether the line view should fade in when lines appear, and fade out when lines disappear.
Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
Called by the DialogueRunner to signal that dialogue has started.
Presents a line using the configured text view.
Field in LinePresenter
Controls whether this Line View will automatically tell the Dialogue Runner that the line is complete as soon as the line has finished appearing.
If this value is true, the Line View will
Field in LinePresenter
The amount of time after the line finishes appearing before automatically ending the line, in seconds.
public float autoAdvanceDelay = 1f;This value is only used when autoAdvance is true .
Field in LinePresenter
The canvas group that contains the UI elements used by this Line View.
If useFadeEffect is true, then the alpha value of this UnityEngine.CanvasGroup will be animated during line presentation and dismissal.
LinePresenter.useFadeEffect: Controls whether the line view should fade in when lines appear, and fade out when lines disappear.
Field in LinePresenter
The game object that holds the characterNameText text field.
public GameObject? characterNameContainer = null;This is needed in situations where the character name is contained within an entirely different game object. Most of the time this will just be the same game object as characterNameText .
Field in LinePresenter
The TMPro.TMP_Text object that displays the character names found in dialogue lines.
public TMP_Text? characterNameText = null;If the LinePresenter receives a line that does not contain a character name, this object will be left blank.
Field in LinePresenter
The time that the fade effect will take to fade lines out.
This value is only used when useFadeEffect is true .
LinePresenter.useFadeEffect: Controls whether the line view should fade in when lines appear, and fade out when lines disappear.
Field in LinePresenter
The time that the fade effect will take to fade lines in.
This value is only used when useFadeEffect is true .
LinePresenter.useFadeEffect: Controls whether the line view should fade in when lines appear, and fade out when lines disappear.
Field in LinePresenter
The number of characters per second that should appear during a typewriter effect.
public int lettersPerSecond = 60;Field in LinePresenter
The TMPro.TMP_Text object that displays the text of dialogue lines.
public TMP_Text? lineText;Field in LinePresenter
Controls whether the lineText object will show the character name present in the line or not.
If this value is true, any character names present in a line will be shown in the lineText object.
If this value is false, character names will not be shown in the lineText object.
Field in LinePresenter
Controls whether the line view should fade in when lines appear, and fade out when lines disappear.
If this value is true, the canvasGroup object's alpha property will animate from 0 to 1 over the course of fadeUpDuration seconds when lines appear, and animate from 1 to zero over the course of fadeDownDuration seconds when lines disappear.
If this value is false, the canvasGroup object will appear instantaneously.
LinePresenter.canvasGroup: The canvas group that contains the UI elements used by this Line View.
LinePresenter.fadeUpDuration: The time that the fade effect will take to fade lines in.
LinePresenter.fadeDownDuration: The time that the fade effect will take to fade lines out.
Method in LinePresenter
Called by the DialogueRunner to signal that the dialogue has ended, and no more lines will be delivered.
This method is called after the last piece of content (that is, lines, options or commands) finished running.
This method is a good place to perform tasks like dismissing on-screen dialogue UI (for example, turning off a letterboxing effect, or hiding dialogue UI elements.)
A task that represents any work done by this dialogue presenter in order to clean up after running dialogue.
Method in LinePresenter
Called by the DialogueRunner to signal that dialogue has started.
This method is called before any content (that is, lines, options or commands) are delivered.
This method is a good place to perform tasks like preparing on-screen dialogue UI (for example, turning on a letterboxing effect, or making dialogue UI elements visible.)
A task that represents any work done by this dialogue presenter in order to get ready for dialogue to run.
Method in LinePresenter
Presents a line using the configured text view.
The line to present.
A LineCancellationToken that represents whether the dialogue presenter should hurry it its presentation of the line, or stop showing the current line.
A task that completes when the dialogue presenter has finished showing the line to the user.
public sealed class LinePresenter : DialoguePresenterBasepublic bool autoAdvance = false;public CanvasGroup? canvasGroup;public float fadeDownDuration = 0.1f;public float fadeUpDuration = 0.25f;public bool showCharacterNameInLine = true;public bool useFadeEffect = true;public override YarnTask OnDialogueCompleteAsync()public override YarnTask OnDialogueStartedAsync()public override async YarnTask RunLineAsync(LocalizedLine line, LineCancellationToken token)