All pages
Powered by GitBook
1 of 21

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

LineAdvancer

Class in Yarn.Unity

Inherits from DialoguePresenterBase

Summary

A dialogue presenter that listens for user input and sends requests to a DialogueRunner to advance the presentation of the current line, either by asking a dialogue runner to hurry up its delivery, advance to the next line, or cancel the entire dialogue session.

Enums

Name
Description

InputMode

The type of input that this line advancer responds to.

Fields

Name
Description

advanceRequestsBeforeCancellingLine

The number of times that a 'hurry up' signal occurs before the line advancer requests that the next line be shown.

multiAdvanceIsCancel

If true , repeatedly signalling that the line should be hurried up will cause the line advancer to request that the next line be shown.

Methods

Name
Description

OnCharacterWillAppear(int,MarkupParseResult,CancellationToken)

OnDialogueCompleteAsync()

Called by a dialogue runner when dialogue ends to remove the input action handlers.

OnDialogueStartedAsync()

Called by a dialogue runner when dialogue starts to add input action handlers for advancing the line.

OnLineDisplayBegin(MarkupParseResult,TMP_Text)

OnLineDisplayComplete()

OnLineWillDismiss()

OnPrepareForLine(MarkupParseResult,TMP_Text)

RequestDialogueCancellation()

Requests that the dialogue runner to instruct all line views to dismiss their content, and then stops the dialogue.

RequestLineHurryUp()

Requests that the line be hurried up.

RequestNextLine()

Requests that the dialogue runner proceeds to the next line.

RequestOptionHurryUp()

RunLineAsync(LocalizedLine,LineCancellationToken)

Called by a dialogue presenter to signal that a line is running.

RunOptionsAsync(DialogueOption[],LineCancellationToken)

Called by a dialogue presenter to signal that options are running.

advanceRequestsBeforeCancellingLine

Field in LineAdvancer

Summary

The number of times that a 'hurry up' signal occurs before the line advancer requests that the next line be shown.

public int advanceRequestsBeforeCancellingLine = 2;

See Also

  • LineAdvancer.multiAdvanceIsCancel: If true , repeatedly signalling that the line should be hurried up will cause the line advancer to request that the next line be shown.

multiAdvanceIsCancel

Field in LineAdvancer

Summary

If true , repeatedly signalling that the line should be hurried up will cause the line advancer to request that the next line be shown.

public bool multiAdvanceIsCancel = false;

See Also

  • LineAdvancer.advanceRequestsBeforeCancellingLine: The number of times that a 'hurry up' signal occurs before the line advancer requests that the next line be shown.

OnCharacterWillAppear(int,MarkupParseResult,CancellationToken)

Method in LineAdvancer

Summary

Parameters

Name
Description

int currentCharacterIndex

MarkupParseResult line

CancellationToken cancellationToken

OnDialogueCompleteAsync()

Method in LineAdvancer

Summary

Called by a dialogue runner when dialogue ends to remove the input action handlers.

public override YarnTask OnDialogueCompleteAsync()

Returns

A completed task.

OnDialogueStartedAsync()

Method in LineAdvancer

Summary

Called by a dialogue runner when dialogue starts to add input action handlers for advancing the line.

public override YarnTask OnDialogueStartedAsync()

Returns

A completed task.

OnLineDisplayBegin(MarkupParseResult,TMP_Text)

Method in LineAdvancer

Summary

Parameters

Name
Description

MarkupParseResult line

TMP_Text text

OnLineDisplayComplete()

Method in LineAdvancer

Summary

public void OnLineDisplayComplete()

OnLineWillDismiss()

Method in LineAdvancer

Summary

public void OnLineWillDismiss()

OnPrepareForLine(MarkupParseResult,TMP_Text)

Method in LineAdvancer

Summary

Parameters

Name
Description

MarkupParseResult line

TMP_Text text

RequestDialogueCancellation()

Method in LineAdvancer

Summary

Requests that the dialogue runner to instruct all line views to dismiss their content, and then stops the dialogue.

public void RequestDialogueCancellation()

RequestLineHurryUp()

Method in LineAdvancer

Summary

Requests that the line be hurried up.

public void RequestLineHurryUp()

Remarks

If this method has been called more times for a single line than Yarn.Unity.LineAdvancer.numberOfAdvancesThisLine , this method requests that the dialogue runner proceed to the next line. Otherwise, it requests that the dialogue runner instruct all line views to hurry up their presentation of the current line.

RequestNextLine()

Method in LineAdvancer

Summary

Requests that the dialogue runner proceeds to the next line.

public void RequestNextLine()

KeyCodes

Enumeration Member in InputMode

Summary

The line advancer responds to keypresses on the keyboard.

KeyCodes

None

Enumeration Member in InputMode

Summary

The line advancer does not respond to any input.

None

Remarks

When a line advancer's Yarn.Unity.LineAdvancer.UsedInputMode is set to None , call the RequestLineHurryUp() , RequestNextLine() and RequestDialogueCancellation() methods directly from your code to control line advancement.

public sealed class LineAdvancer : DialoguePresenterBase, IActionMarkupHandler

LegacyInputAxes

Enumeration Member in InputMode

Summary

The line advancer responds to input from the legacy Input Manager .

LegacyInputAxes

RequestOptionHurryUp()

Method in LineAdvancer

Summary

public void RequestOptionHurryUp()
public YarnTask OnCharacterWillAppear(int currentCharacterIndex, MarkupParseResult line, CancellationToken cancellationToken)
public void OnLineDisplayBegin(MarkupParseResult line, TMP_Text text)
public void OnPrepareForLine(MarkupParseResult line, TMP_Text text)

RunLineAsync(LocalizedLine,LineCancellationToken)

Method in LineAdvancer

Summary

Called by a dialogue presenter to signal that a line is running.

public override YarnTask RunLineAsync(LocalizedLine line, LineCancellationToken token)

Parameters

Name
Description

Yarn.Unity.LocalizedLine line

The line to present.

token

A that represents whether the dialogue presenter should hurry it its presentation of the line, or stop showing the current line.

Returns

A completed task.

RunOptionsAsync(DialogueOption[],LineCancellationToken)

Method in LineAdvancer

Summary

Called by a dialogue presenter to signal that options are running.

public override YarnTask<DialogueOption?> RunOptionsAsync(DialogueOption[] dialogueOptions, LineCancellationToken cancellationToken)

Parameters

Name
Description

Yarn.Unity.DialogueOption[] dialogueOptions

cancellationToken

Returns

A completed task indicating that no option was selected by this view.

InputMode

Enum in LineAdvancer

Inherits from System.Enum

Summary

The type of input that this line advancer responds to.

public enum InputMode
{
    InputActions,
    KeyCodes,
    None,
    LegacyInputAxes
}

Members

Name
Description

InputActions

The line advancer responds to Input Actions from the .

The line advancer responds to keypresses on the keyboard.

The line advancer responds to input from the legacy .

The line advancer does not respond to any input.

InputActions

Enumeration Member in

The line advancer responds to Input Actions from the .

Unity Input System
KeyCodes
LegacyInputAxes
Input Manager
None
Yarn.Unity.LineCancellationToken
LineCancellationToken
Yarn.Unity.LineCancellationToken
InputActions

Summary

InputMode
Unity Input System