All pages
Powered by GitBook
1 of 71

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Yarn.Markup Namespace

Summary

Contains classes for working with markup in Yarn lines.

Classes

Name
Description

BuiltInMarkupReplacer

A marker processor that handles the built-in markers [select] [plural] , and [ordinal] .

LineParser

Parses text and produces markup information.

MarkupParseException

An exception representing something going wrong when parsing markup.

Enums

Name
Description

MarkupValueType

A type of MarkupValue .

TagType

A type of Yarn.Markup.MarkupAttributeMarker .

Interfaces

Name
Description

IAttributeMarkerProcessor

Provides a mechanism for producing replacement text for a marker.

Structs

Name
Description

MarkupAttribute

Represents a range of text in a marked-up string.

MarkupParseResult

The result of parsing a line of marked-up text.

MarkupProperty

A property associated with a MarkupAttribute .

MarkupValue

A value associated with a MarkupProperty .

ReplacementMarkerResult

A bundle of results from processing replacement markers.

BuiltInMarkupReplacer

Class in Yarn.Markup

Inherits from System.Object

Summary

A marker processor that handles the built-in markers [select] [plural] , and [ordinal] .

public class BuiltInMarkupReplacer : IAttributeMarkerProcessor

Methods

Name
Description

ProcessReplacementMarker(MarkupAttribute,StringBuilder,List,string)

Produces replacement text for a marker.

ProcessReplacementMarker(MarkupAttribute,StringBuilder,List<MarkupAttribute>,string)

Method in BuiltInMarkupReplacer

Summary

Produces replacement text for a marker.

Parameters

Name
Description

Yarn.Markup.MarkupAttribute marker

The marker to process into replacement text.

System.Text.StringBuilder childBuilder

A System.Text.StringBuilder that contains the child text contained within marker . Use the methods on this stringbuilder to produce any text needed from this marker.

System.Collections.Generic.List<Yarn.Markup.MarkupAttribute> childAttributes

The child attributes of marker .

string localeCode

A BCP-47 locale code that represents the locale in which any processing should take place.

Returns

The collection of diagnostics produced during processing, and the number of invisible characters created during processing.

IAttributeMarkerProcessor

Interface in Yarn.Markup

Summary

Provides a mechanism for producing replacement text for a marker.

Methods

Name
Description

ProcessReplacementMarker(MarkupAttribute,System.Text.StringBuilder,List,string)

Produces replacement text for a marker.

See Also

  • LineParser.RegisterMarkerProcessor(string,IAttributeMarkerProcessor): Registers an object as a marker processor for a given marker name.

  • LineParser.DeregisterMarkerProcessor(string): Removes any marker processor associated with a given marker name.

CharacterAttribute

Field in LineParser

Summary

The name of the implicitly-generated character attribute.

public const string CharacterAttribute = "character";

See Also

  • LineParser.CharacterAttributeNameProperty: The name of the 'name' property, on the implicitly-generated character attribute.

CharacterAttributeNameProperty

Field in LineParser

Summary

The name of the 'name' property, on the implicitly-generated character attribute.

public const string CharacterAttributeNameProperty = "name";

See Also

  • LineParser.CharacterAttribute: The name of the implicitly-generated character attribute.

NoMarkupAttribute

Field in LineParser

Summary

The name of the attribute to use to indicate that no marker processing should occur.

public const string NoMarkupAttribute = "nomarkup";

ReplacementMarkerContents

Field in LineParser

Summary

The name of the property in replacement attributes that contains the text of the attribute.

public const string ReplacementMarkerContents = "contents";

TrimWhitespaceProperty

Field in LineParser

Summary

The name of the property to use to signify that trailing whitespace should be trimmed if a tag had preceding whitespace or begins the line. This property must be a bool value.

public const string TrimWhitespaceProperty = "trimwhitespace";

DeregisterMarkerProcessor(string)

Method in LineParser

Summary

Removes any marker processor associated with a given marker name.

public void DeregisterMarkerProcessor(string attributeName)

Parameters

Name
Description

string attributeName

The name of the marker.

Dispose()

Method in LineParser

Summary

public void Dispose()

ExpandSubstitutions(string,IList<string>)

Method in LineParser

Summary

Replaces all substitution markers in a text with the given substitution list.

Remarks

This method replaces substitution markers - for example, {0}

  • with the corresponding entry in substitutions . If text contains a substitution marker whose index is not present in substitutions , it is ignored.

Parameters

Name
Description

string text

The text containing substitution markers.

System.Collections.Generic.IList<string> substitutions

The list of substitutions.

Returns

text , with the content from substitutions inserted.

MarkupDiagnostic(string,int)

Constructor in MarkupDiagnostic

Summary

Initialises a new instance of the MarkupDiagnostic struct.

Parameters

Name
Description

string message

The diagnostic text.

int column

The zero-based first column of the diagnostic's range.

Equals(object)

Method in MarkupDiagnostic

Summary

public override readonly bool Equals(object obj)

Parameters

Name
Description

object obj

Equals(MarkupDiagnostic)

Method in MarkupDiagnostic

Summary

public readonly bool Equals(MarkupDiagnostic other)

Parameters

Name
Description

Yarn.Markup.LineParser.MarkupDiagnostic other

GetHashCode()

Method in MarkupDiagnostic

Summary

public override readonly int GetHashCode()

M:Yarn.Markup.LineParser.MarkupDiagnostic.op_Equality(Yarn.Markup.LineParser.MarkupDiagnostic,Yarn.M

TYPENAME_UNKNOWN in MarkupDiagnostic

Summary

(no declaration available)

M:Yarn.Markup.LineParser.MarkupDiagnostic.op_Inequality(Yarn.Markup.LineParser.MarkupDiagnostic,Yarn

TYPENAME_UNKNOWN in MarkupDiagnostic

Summary

(no declaration available)

Column

Property in MarkupDiagnostic

Summary

Gets the zero-based column index of the start of the range at which this diagnostic appears.

public int Column { get; }

Message

Property in MarkupDiagnostic

Summary

Gets the text of the diagnostic.

public string Message { get; }

Shift(int)

Method in MarkupAttribute

Summary

Creates a new MarkupAttribute based on the current instance whose Position is shifted towards the end of the string by shift characters.

Parameters

Name
Description

int shift

The number of characters to shift by.

Returns

A new MarkupAttribute with an updated Position .

ToString()

Method in MarkupAttribute

Summary

public override readonly string ToString()

TryGetProperty(string,bool)

Method in MarkupAttribute

Summary

Gets a boolean property named name from this attribute, if present.

Parameters

Name
Description

string name

The name of the property.

bool result

On return, the property's value if found, or false if not.

Returns

true if a property named name was found; false otherwise.

TryGetProperty(string,int)

Method in MarkupAttribute

Summary

Gets an integer property named name from this attribute, if present.

Parameters

Name
Description

string name

The name of the property.

int result

On return, the property's value if found, or zero if not.

Returns

true if a property named name was found; false otherwise.

TryGetProperty(string,float)

Method in MarkupAttribute

Summary

Gets a float property named name from this attribute, if present.

Parameters

Name
Description

string name

The name of the property.

float result

On return, the property's value if found, or zero if not.

Returns

true if a property named name was found; false otherwise.

TryGetProperty(string,string?)

Method in MarkupAttribute

Summary

Gets a string property named name from this attribute, if present.

Parameters

Name
Description

string name

The name of the property.

string result

On return, the property's value if found, or null if not.

Returns

true if a property named name was found; false otherwise.

Length

Property in MarkupAttribute

Summary

Gets the number of text elements in the plain text that this attribute covers.

public int Length { get; internal set; }

Name

Property in MarkupAttribute

Summary

Gets the name of the attribute.

public string Name { get; internal set; }

Position

Property in MarkupAttribute

Summary

Gets the position in the plain text where this attribute begins.

public int Position { get; internal set; }

Properties

Property in MarkupAttribute

Summary

Gets the properties associated with this attribute.

public IReadOnlyDictionary<string, MarkupValue> Properties { get; internal set; }

MarkupParseException

Class in Yarn.Markup

Inherits from System.Exception

Summary

An exception representing something going wrong when parsing markup.

public class MarkupParseException : Exception

See Also

  • LineParser: Parses text and produces markup information.

MarkupParseResult(string,List<MarkupAttribute>)

Constructor in MarkupParseResult

Summary

Initializes a new instance of the MarkupParseResult struct.

Parameters

Name
Description

string text

The plain text.

System.Collections.Generic.List<Yarn.Markup.MarkupAttribute> attributes

The list of attributes.

Attributes

Property in MarkupParseResult

Summary

The list of MarkupAttribute s in this parse result.

public List<MarkupAttribute> Attributes { get; }

Text

Property in MarkupParseResult

Summary

The original text, with all parsed markers removed.

public string Text { get; }

Name

Property in MarkupProperty

Summary

Gets the name of the property.

public string Name { get; private set; }

Value

Property in MarkupProperty

Summary

Gets the value of the property.

public MarkupValue Value { get; private set; }

ToString()

Method in MarkupValue

Summary

public readonly override string ToString()

ToString(IFormatProvider)

Method in MarkupValue

Summary

public readonly string ToString(IFormatProvider formatProvider)

Parameters

Name
Description

System.IFormatProvider formatProvider

BoolValue

Property in MarkupValue

Summary

Gets the bool value of this property.

public bool BoolValue { get; internal set; }

Remarks

This property is only defined when the property's Type is Bool .

FloatValue

Property in MarkupValue

Summary

Gets the float value of this property.

public float FloatValue { get; internal set; }

Remarks

This property is only defined when the property's Type is Float .

StringValue

Property in MarkupValue

Summary

Gets the string value of this property.

public string StringValue { get; internal set; }

Remarks

This property is only defined when the property's Type is String .

Type

Property in MarkupValue

Summary

Gets the value's type.

public MarkupValueType Type { get; internal set; }

Bool

Enumeration Member in MarkupValueType

Summary

A bool.

Bool

Float

Enumeration Member in MarkupValueType

Summary

A float.

Float

Integer

Enumeration Member in MarkupValueType

Summary

An integer.

Integer

Diagnostics

Field in ReplacementMarkerResult

Summary

The collection of diagnostics produced during processing, if any.

public List<LineParser.MarkupDiagnostic> Diagnostics;

RegisterMarkerProcessor(string,IAttributeMarkerProcessor)

Method in LineParser

Summary

Registers an object as a marker processor for a given marker name.

Remarks

When a marker processor is registered for a marker name, the parser will ask the processor for text to insert into the plain text. This allows users of the LineParser class to dynamically replace text in a line. The nomarkup tag is implemented in this way by the LineParser class directly; the Dialogue class uses this mechanism to implement the select , plural and ordinal markers.

Parameters

Name
Description

string attributeName

The name of the marker that should use this marker processor.

Yarn.Markup.IAttributeMarkerProcessor markerProcessor

The object that should be invoked when markers with this name are encountered.

ParseString(string,string,bool)

Method in LineParser

Summary

Parses a string of text and produces a markup parse result.

Parameters

Name
Description

string input

The text to parse.

string localeCode

The locale to use when processing markers, as a BCP-47 locale tag.

squish

If false , markers that are split as part of the markup parsing process will not be re-merged before returning the result.

sort

If true , markers will be sorted based on their position in the input.å

bool addImplicitCharacterAttribute

If true, the parser will attempt to detect a character name in the text and add a [character] attribute for it.

Returns

A markup parse result.

TextForAttribute(MarkupAttribute)

Method in MarkupParseResult

Summary

Returns the substring of Text covered by attribute Position and Length properties.

Remarks

If the attribute's Length property is zero, this method returns the empty string.

This method does not check to see if attribute is an attribute belonging to this MarkupParseResult. As a result, if you pass an attribute that doesn't belong, it may describe a range of text that does not appear in Text. If this occurs, an System.IndexOutOfRangeException will be thrown.

Parameters

Name
Description

Yarn.Markup.MarkupAttribute attribute

The attribute to get the text for.

Returns

The text contained within the attribute.

MarkupProperty

Struct in Yarn.Markup

Inherits from System.ValueType

Summary

A property associated with a MarkupAttribute .

Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as LineParser .

Properties

Name
Description

Name

Gets the name of the property.

Value

Gets the value of the property.

See Also

  • Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean):

DeleteRange(MarkupAttribute)

Method in MarkupParseResult

Summary

Deletes an attribute from this markup.

Remarks

This method deletes the range of text covered by attributeToDelete , and updates the other attributes in this markup as follows:

  • Attributes that start and end before the deleted attribute are unmodified.

  • Attributes that start before the deleted attribute and end inside it are truncated to remove the part overlapping the deleted attribute.

  • Attributes that have the same position and length as the deleted attribute are deleted, if they apply to any text.

  • Attributes that start and end within the deleted attribute are deleted.

  • Attributes that start within the deleted attribute, and end outside it, have their start truncated to remove the part overlapping the deleted attribute.

  • Attributes that start after the deleted attribute have their start point adjusted to account for the deleted text.

This method does not modify the current object. A new MarkupParseResult is returned.

If attributeToDelete is not an attribute of this MarkupParseResult, the behaviour is undefined.

Parameters

Name
Description

Yarn.Markup.MarkupAttribute attributeToDelete

The attribute to remove.

Returns

A new MarkupParseResult object, with the plain text modified and an updated collection of attributes.

ProcessReplacementMarker(MarkupAttribute,System.Text.StringBuilder,List<MarkupAttribute>,string)

Method in IAttributeMarkerProcessor

Summary

Produces replacement text for a marker.

Parameters

Name
Description

Yarn.Markup.MarkupAttribute marker

The marker to process into replacement text.

System.Text.StringBuilder childBuilder

A System.Text.StringBuilder that contains the child text contained within marker . Use the methods on this stringbuilder to produce any text needed from this marker.

System.Collections.Generic.List<Yarn.Markup.MarkupAttribute> childAttributes

The child attributes of marker .

string localeCode

A BCP-47 locale code that represents the locale in which any processing should take place.

Returns

The collection of diagnostics produced during processing, and the number of invisible characters created during processing.

String

Enumeration Member in MarkupValueType

Summary

A string.

String

IntegerValue

Property in MarkupValue

Summary

Gets the integer value of this property.

public int IntegerValue { get; internal set; }

Remarks

This property is only defined when the property's Type is Integer .

Close

Enumeration Member in TagType

Summary

A closing marker. For example, [/a] .

Close

ReplacementMarkerResult(List<LineParser.MarkupDiagnostic>,int)

Constructor in ReplacementMarkerResult

Summary

Convenience constructor for replacement markup results.

Parameters

Name
Description

System.Collections.Generic.List<Yarn.Markup.LineParser.MarkupDiagnostic> diagnostics

The diagnostics generated during processing

int invisibleCharacters

the number of invisible characters generated during processing.

CloseAll

Enumeration Member in TagType

Summary

The close-all marker, [/] .

CloseAll

Open

Enumeration Member in TagType

Summary

An open marker. For example, [a] .

Open

InvisibleCharacters

Field in ReplacementMarkerResult

Summary

The number of invisible characters added into the line during processing.

Remarks

This will vary depending on what the replacement markup needs to do.

  • When only inserting rich-text tags, this should be the length of all inserted text. For example "this is text with [bold]some bold[/bold] elements" translated into Unity style rich-text become "this is text with <b>some bold</b> elements". In this case then the value of InvisibleCharacters would be seven.

  • When only modifying the content of the children text, such as making all text upper case, this should be 0. For example "this is text with [upper]some uppercased[/upper] elements" is transformed into "this is text with SOME UPPERCASED elements". The number of invisible character will be zero.

  • When adding new content into the line (regardless of being added at the start, end, or middle) this should be zero but the replacement processor should make sure to shift along it's children attributes where appropriate. For example "this is text with [emph]some emphasised[/emph] elements" transformed into "this is text with !!some emphasised!! elements" the value of InvisibleCharacters would be zero. In this case however the childAttributes in ProcessReplacementMarker(MarkupAttribute,System.Text.StringBuilder,List<MarkupAttribute>,string) would need to be shifted down two.

SelfClosing

Enumeration Member in TagType

Summary

A self-closing marker. For example, [a/] .

SelfClosing

ReplacementMarkerResult(int)

Constructor in ReplacementMarkerResult

Summary

Convenience form of ReplacementMarkerResult(List<LineParser.MarkupDiagnostic>,int) for when there are no diagnostics.

public ReplacementMarkerResult(int invisibleCharacters)

Parameters

Name
Description

int invisibleCharacters

the number of invisible characters generated during processing.

public ReplacementMarkerResult ProcessReplacementMarker(MarkupAttribute marker, StringBuilder childBuilder, List<MarkupAttribute> childAttributes, string localeCode)
public interface IAttributeMarkerProcessor
public static string ExpandSubstitutions(string text, IList<string> substitutions)
public MarkupDiagnostic(string message, int column = -1)
public readonly MarkupAttribute Shift(int shift)
public readonly bool TryGetProperty(string name, out bool result)
public readonly bool TryGetProperty(string name, out int result)
public bool TryGetProperty(string name, out float result)
public readonly bool TryGetProperty(string name, [NotNullWhen(true)] out string? result)
public MarkupParseResult(string text, List<MarkupAttribute> attributes)
public void RegisterMarkerProcessor(string attributeName, IAttributeMarkerProcessor markerProcessor)
public MarkupParseResult ParseString(string input, string localeCode, bool addImplicitCharacterAttribute = true)
public readonly string TextForAttribute(MarkupAttribute attribute)
public struct MarkupProperty
public readonly MarkupParseResult DeleteRange(MarkupAttribute attributeToDelete)
public ReplacementMarkerResult ProcessReplacementMarker(MarkupAttribute marker, System.Text.StringBuilder childBuilder, List<MarkupAttribute> childAttributes, string localeCode);
public ReplacementMarkerResult(List<LineParser.MarkupDiagnostic> diagnostics, int invisibleCharacters)
public int InvisibleCharacters;

LineParser

Class in Yarn.Markup

Inherits from System.Object

Summary

Parses text and produces markup information.

public sealed class LineParser : IDisposable

Fields

Name
Description

CharacterAttribute

The name of the implicitly-generated character attribute.

The name of the 'name' property, on the implicitly-generated character attribute.

The name of the attribute to use to indicate that no marker processing should occur.

The name of the property in replacement attributes that contains the text of the attribute.

The name of the property to use to signify that trailing whitespace should be trimmed if a tag had preceding whitespace or begins the line. This property must be a bool value.

Methods

Name
Description

Removes any marker processor associated with a given marker name.

Structs

Name
Description

Represents a diagnostic message produced during markup parsing.

MarkupDiagnostic

Struct in LineParser

Inherits from System.ValueType

Summary

Represents a diagnostic message produced during markup parsing.

public struct MarkupDiagnostic : IEquatable<MarkupDiagnostic>

Constructors

Name
Description

MarkupDiagnostic(string,int)

Initialises a new instance of the struct.

Methods

Name
Description

Properties

Name
Description

Gets the zero-based column index of the start of the range at which this diagnostic appears.

Gets the text of the diagnostic.

TYPENAME_UNKNOWN_PLURAL

Name
Description

TryGetProperty(string,MarkupValue)

Method in MarkupAttribute

Summary

Gets a property named name from this attribute, if present.

public readonly bool TryGetProperty(string name, out MarkupValue result)

Parameters

Name
Description

string name

The name of the property.

result

On return, the property's value if found, or zero if not.

Returns

true if a property named name was found; false otherwise.

MarkupParseResult

Struct in Yarn.Markup

Inherits from System.ValueType

Summary

The result of parsing a line of marked-up text.

public struct MarkupParseResult

Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as Dialogue .

Constructors

Name
Description

Initializes a new instance of the struct.

Methods

Name
Description

Deletes an attribute from this markup.

Returns the substring of covered by attribute Position and Length properties.

Properties

Name
Description

The list of s in this parse result.

The original text, with all parsed markers removed.

See Also

  • Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean):

TryGetAttributeWithName(string,MarkupAttribute)

Method in MarkupParseResult

Summary

Gets the first attribute with the specified name, if present.

public readonly bool TryGetAttributeWithName(string name, out MarkupAttribute attribute)

Parameters

Name
Description

string name

The name of the attribute to get.

attribute

When this method returns, contains the attribute with the specified name, if the attribute is found; otherwise, the default . This parameter is passed uninitialized.

Returns

true if the MarkupParseResult contains an attribute with the specified name; otherwise, false .

MarkupAttribute

Struct in Yarn.Markup

Inherits from System.ValueType

Summary

Represents a range of text in a marked-up string.

public struct MarkupAttribute

Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as LineParser .

Methods

Name
Description
Name
Description
  • Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean):

MarkupValueType

Enum in Yarn.Markup

Inherits from System.Enum

Summary

A type of MarkupValue .

public enum MarkupValueType
{
    Integer,
    Float,
    String,
    Bool
#pragma warning restore CA1720
}

Members

Name
Description

ReplacementMarkerResult

Struct in Yarn.Markup

Inherits from System.ValueType

Summary

A bundle of results from processing replacement markers.

public struct ReplacementMarkerResult

Constructors

Name
Description

Name
Description
  • : Provides a mechanism for producing replacement text for a marker.

Replaces all substitution markers in a text with the given substitution list.

ParseString(string,string,bool)

Parses a string of text and produces a markup parse result.

RegisterMarkerProcessor(string,IAttributeMarkerProcessor)

Registers an object as a marker processor for a given marker name.

CharacterAttributeNameProperty
NoMarkupAttribute
ReplacementMarkerContents
TrimWhitespaceProperty
DeregisterMarkerProcessor(string)
Dispose()
ExpandSubstitutions(string,IList)
MarkupDiagnostic

MarkupDiagnostic
Equals(object)
Equals(MarkupDiagnostic)
GetHashCode()
Column
Message
M:Yarn.Markup.LineParser.MarkupDiagnostic.op_Equality(Yarn.Markup.LineParser.MarkupDiagnostic,Yarn.Markup.LineParser.MarkupDiagnostic)
M:Yarn.Markup.LineParser.MarkupDiagnostic.op_Inequality(Yarn.Markup.LineParser.MarkupDiagnostic,Yarn.Markup.LineParser.MarkupDiagnostic)

Gets the first attribute with the specified name, if present.

MarkupParseResult(string,List)
MarkupParseResult
DeleteRange(MarkupAttribute)
TextForAttribute(MarkupAttribute)
Text
TryGetAttributeWithName(string,MarkupAttribute)
Attributes
MarkupAttribute
Text
Yarn.Markup.MarkupValue
Yarn.Markup.MarkupAttribute
MarkupAttribute

A bool.

Float

A float.

Integer

An integer.

String

A string.

Bool

Convenience constructor for replacement markup results.

ReplacementMarkerResult(int)

Convenience form of ReplacementMarkerResult(List<LineParser.MarkupDiagnostic>,int) for when there are no diagnostics.

Diagnostics

The collection of diagnostics produced during processing, if any.

InvisibleCharacters

The number of invisible characters added into the line during processing.

Fields

See Also

IAttributeMarkerProcessor
ReplacementMarkerResult(List<LineParser.MarkupDiagnostic>,int)

Gets the properties associated with this attribute.

Shift(int)

Creates a new MarkupAttribute based on the current instance whose Position is shifted towards the end of the string by shift characters.

ToString()

TryGetProperty(string,bool)

Gets a boolean property named name from this attribute, if present.

TryGetProperty(string,int)

Gets an integer property named name from this attribute, if present.

TryGetProperty(string,float)

Gets a float property named name from this attribute, if present.

TryGetProperty(string,string?)

Gets a string property named name from this attribute, if present.

TryGetProperty(string,MarkupValue)

Gets a property named name from this attribute, if present.

Length

Gets the number of text elements in the plain text that this attribute covers.

Name

Gets the name of the attribute.

Position

Properties

See Also

Gets the position in the plain text where this attribute begins.

TagType

Enum in Yarn.Markup

Inherits from System.Enum

Summary

A type of Yarn.Markup.MarkupAttributeMarker .

public enum TagType
{
    Open,
    Close,
    SelfClosing,
    CloseAll
}

Members

Name
Description

Properties

A closing marker. For example, [/a] .

The close-all marker, [/] .

An open marker. For example, [a] .

A self-closing marker. For example, [a/] .

Close
CloseAll
Open
SelfClosing

MarkupValue

Struct in Yarn.Markup

Inherits from System.ValueType

Summary

A value associated with a MarkupProperty .

public struct MarkupValue

Remarks

You do not create instances of this struct yourself. It is created by objects that can parse markup, such as LineParser .

Methods

Name
Description
Name
Description
  • Yarn.Markup.LineParser.ParseString(System.String,System.String,System.Boolean,System.Boolean,System.Boolean):

Gets the bool value of this property.

Gets the float value of this property.

Properties

See Also

Gets the integer value of this property.

Gets the string value of this property.

Gets the value's type.

ToString()
ToString(IFormatProvider)
BoolValue
FloatValue
IntegerValue
StringValue
Type