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).

StyleMarkerProcessor

An attribute marker processor that inserts TextMeshPro style tags where Yarn Spinner [style] tags appear in a line.
public sealed class StyleMarkerProcessor : ReplacementMarkupHandler

Inherits from Yarn.Unity.ReplacementMarkupHandler

Implements Yarn.Markup.IAttributeMarkerProcessor

While this provides a lot of extra styling for basically no work there is a tradeoff. The TMP stylesheets can't be inspected to see how they work, as such we have no way of knowing if a style will add in visible characters. As an example of this the H1 tag in the default style sheet adds wraps asterisks and this will offset other markers. So while we could special case that specific tag if you (or Unity) were to change it we'd again have no way to know this. The practical upshot of this is if you are mixing TMP styles with other markup be wary.

#Fields

#lineProvider

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

Type LineProviderBehaviour

#Methods

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

public override ReplacementMarkerResult ProcessReplacementMarker(MarkupAttribute marker, StringBuilder childBuilder, List<MarkupAttribute> childAttributes, string localeCode)

Parameters

  • childBuilderStringBuilder
  • childAttributesList<MarkupAttribute>
  • localeCodestring

Returns ReplacementMarkerResult

Generated from Yarn Spinner for Unity 3.3.