Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

PaletteMarkerProcessor

An attribute marker processor that uses a MarkupPalette to apply TextMeshPro styling tags to a line.
public sealed class PaletteMarkerProcessor : Yarn.Unity.ReplacementMarkupHandler

Inherits from Yarn.Unity.ReplacementMarkupHandler

Implements Yarn.Markup.IAttributeMarkerProcessor

This marker processor registers itself as a handler for markers whose name is equal to the name of a style in the given palette. For example, if the palette defines a style named "happy", this marker processor will process tags in a Yarn line named [happy] by inserting the appropriate TextMeshPro style tags defined for the "happy" style.

#Fields

#lineProvider

The line provider to register this markup processor with.
public LineProviderBehaviour? lineProvider;

Type LineProviderBehaviour

#palette

The MarkupPalette to use when applying styles.
public MarkupPalette? palette;

Type MarkupPalette

#Methods

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

Processes a replacement marker by applying the style from the given palette.
public override ReplacementMarkerResult ProcessReplacementMarker(MarkupAttribute marker, StringBuilder childBuilder, List<MarkupAttribute> childAttributes, string localeCode)

Parameters

  • The marker to process.
  • childBuilderStringBuilder
    A StringBuilder to build the styled text in.
  • childAttributesList<MarkupAttribute>
    An optional list of child attributes to apply, but this is ignored for TextMeshPro styles.
  • localeCodestring
    The locale code to use when formatting the style.

Returns ReplacementMarkerResult: A list of markup diagnostics if there are any errors, otherwise an empty list.

Generated from Yarn Spinner for Unity 3.3.