Tag

Basic

Tags in Animatext are similar to those in rich text. If you are not familiar with rich text, please read UGUI - Rich Text or TextMeshPro - Rich Text first.

Unit Tag

Unit tag is used to define the new unit.


Added unit tag splits up the original unit.

Example: "Ani<w>ma</w>text" would mean the "ma" is defined as a new word. The original word "Animatext" would be split into three separate words: "Ani", "ma", "text".


Unit tags do not support nesting.

Example: "<w>Ani<w>ma</w>text</w>" is the same as "<w>Animatext</w>".

Preset Tag

Preset tag is used to define the character range of the presets. You can set the tag name in the preset.

The preset is automatically added to all text without using the preset tag when the tag name is null or empty.

Tag Order

Tag order is used to modify the execution order of the tag range. Format: tag name + marker symbol + # + tag order (The tag order must be an integer).

Tag order can't be added to single closing tag and all closing tag.


In the opening tag and empty tag, the tag order represents the main order of the tag range. In the closing tag, the tag order represents the secondary order of the tag range.

The default main order of tag range is 0. The default secondary order of tag range is the first character index in the origin text.

The secondary order of the tag range which the tag name is null or empty is -1.


The tag range is executed from small to large according to the main order.

When the main order is the same, it is executed from small to large according to the secondary order.

When the secondary order is the same, it is executed from front to back according to the tag range.

Example: <AT>Ani</AT/#22><AT>mat</AT><AT/#1>ext</AT>. The execution order is "mat", "Ani" and "ext".

Tag Interval

Tag interval is used to adjust the execution time of the tag range. Format: tag name + marker symbol + interval type symbol + tag interval.

Tag interval can't be added to single closing tag and all closing tag.

Tag order and tag interval can be added to the same tag. Example: <tagName/#1/+0.5>, <tagName/+0.5/#1>.


There are four interval types: add, equal, replace, cover.

In the opening tag and the empty tag, the interval represents the start interval of the tag range. In the closing tag, the interval represents the range interval of the tag range.


Example: The start interval of each tag range is 0.5. The range interval of each tag range is 1.5. You can open the "4.4 - Tag Interval (3)" scene to see the examples of the tag intervals.

Notation

By default, Animatext uses angle brackets("<" , ">") to denote tag symbols and slashes ("/") to denote marker symbols. You can change the default notations in the settings.


Tag symbols


Marker symbols


Example: Using curly brackets ("{" , "}") to denote tag symbols and backslashes ("\") to denote marker symbols.