StyleMarkerProcessor
An attribute marker processor that inserts TextMeshPro style tags where
Yarn Spinner
[style] tags appear in a line.public sealed class StyleMarkerProcessor : ReplacementMarkupHandlerInherits 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;#Methods
#ProcessReplacementMarker(MarkupAttribute, StringBuilder, List<MarkupAttribute>, string)
public override ReplacementMarkerResult ProcessReplacementMarker(MarkupAttribute marker, StringBuilder childBuilder, List<MarkupAttribute> childAttributes, string localeCode)Parameters
markerMarkupAttributechildBuilderStringBuilderchildAttributesList<MarkupAttribute>localeCodestring
Returns ReplacementMarkerResult
Generated from Yarn Spinner for Unity 3.3.