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.
opening tag<tagName>Marks the opening of a section.
closing tag</tagName>Marks the closing of a section. The closing tag at the end of the text can be omitted.
empty tag<tagName/>Marks empty content of a section. The abbreviation of <tagName></tagName>.
single closing tag</>Marks the closing of the previous opening tag.
all closing tag<//>Marks the closing of all opening tags before it.
Unit Tag
Unit tag is used to define the new unit.
character tag<c>It defines the enclosed text as a new character in character presets.
word tag<w>It defines the enclosed text as a new word in word presets.
line tag<l>It defines the enclosed text as a new line in line presets.
group tag<g>It defines the enclosed text as a new group in group presets.
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 tag name can't contain tag symbols or marker symbols, by default including "<", ">", "/".
The tag name can't be the same as the name of a unit tag, including "c", "w", "l", "g".
-
The tag name shouldn't be the same as the rich text tag name of the text component.
UGUIa, b, color, i, material, quad, size.
TextMeshProalign, alpha, b, color, cspace, font, i, indent, line-height, line-indent, link, lowercase, margin, mark,
mspace, noparse, nobr, page, pos, s, size, smallcaps, space, sprite, style, sub, sup, u, uppercase, voffset, width.
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).
opening tag<tagName/#-1>, <tagName/#0>, <tagName/#1>.
closing tag</tagName/#-1>, </tagName/#0>, </tagName/#1>.
empty tag<tagName/#-1/>, <tagName/#0/>, <tagName/#1/>.
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".
The main order of "Ani" is 0. The secondary order of "Ani" is 22.
The main order of "mat" is 0. The secondary order of "Ani" is 16.
The main order of "ext" is 1. The secondary order of "Ani" is 28.
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.
opening tag<tagName/-1>, <tagName/+-0.5>, <tagName/=0>, <tagName/?0.5>, <tagName/!1>.
closing tag</tagName/-1>, </tagName/+-0.5>, </tagName/=0>, </tagName/?0.5>, </tagName/!1>.
empty tag<tagName/-1/>, <tagName/+-0.5/>, <tagName/=0/>, <tagName/?0.5/>, <tagName/!1/>.
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.
add+The interval adds the tag interval. The interval type symbol "+" can be omitted.
equal=The interval equals the tag interval.
replace?The interval adds the tag interval. The execution time shall be recounted from 0.
cover!The interval equals the tag interval. The execution time shall be recounted from 0.
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.
-
<AT>Ani</AT><AT>mat</AT><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+0.5=2.5.
The execution time of "ext" is (0.5+1.5)+(0.5+1.5)+0.5=4.5.
-
<AT>Ani</AT><AT/+1>mat</AT><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+(0.5+1)=3.5.
The execution time of "ext" is (0.5+1.5)+(0.5+1+1.5)+0.5=5.5.
-
<AT>Ani</AT><AT/=1>mat</AT><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+1=3.
The execution time of "ext" is (0.5+1.5)+(1+1.5)+0.5=5.
-
<AT>Ani</AT><AT/?1>mat</AT><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 0.5+1=1.5.
The execution time of "ext" is (0.5+1+1.5)+0.5=3.5.
-
<AT>Ani</AT><AT/!1>mat</AT><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 1.
The execution time of "ext" is (1+1.5)+0.5=3.
-
<AT>Ani</AT><AT>mat</AT/+1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+0.5=2.5.
The execution time of "ext" is (0.5+1.5)+(0.5+1.5+1)+0.5=5.5.
-
<AT>Ani</AT><AT>mat</AT/=1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+0.5=2.5.
The execution time of "ext" is (0.5+1.5)+(0.5+1)+0.5=4.
-
<AT>Ani</AT><AT>mat</AT/?1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+0.5=2.5.
The execution time of "ext" is (1.5+1)+0.5=3.
-
<AT>Ani</AT><AT>mat</AT/!1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is (0.5+1.5)+0.5=2.5.
The execution time of "ext" is 1+0.5=1.5.
-
<AT>Ani</AT><AT/!1>mat</AT/+1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 1.
The execution time of "ext" is (1+1.5+1)+0.5=4.
-
<AT>Ani</AT><AT/!1>mat</AT/=1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 1.
The execution time of "ext" is (1+1)+0.5=2.5.
-
<AT>Ani</AT><AT/!1>mat</AT/?1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 1.
The execution time of "ext" is (1.5+1)+0.5=3.
-
<AT>Ani</AT><AT/!1>mat</AT/!1><AT>ext</AT>
The execution time of "Ani" is 0.5.
The execution time of "mat" is 1.
The execution time of "ext" is 1+0.5=1.5.
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
AngleBracketsUsing angle brackets "<" and ">" to denote tag symbols.
CurlyBracketsUsing curly brackets "{" and "}" to denote tag symbols.
RoundBracketsUsing round brackets "(" and ")" to denote tag symbols.
SquareBracketsUsing square brackets "[" and "]" to denote tag symbols.
Marker symbols
BackslashesUsing the backslashes "\" to denote marker symbols.
SlashesUsing the slashes "/" to denote marker symbols.
VerticalBarsUsing the vertical bars "|" to denote marker symbols.
Example: Using curly brackets ("{" , "}") to denote tag symbols and backslashes ("\") to denote marker symbols.
Opening tag{tagName}, {tagName\#1}, {tagName\0.5}, {tagName\0.5\#1}, {tagName\#1\0.5}
Closing tag{\tagName}, {\tagName\#1}, {\tagName\0.5}, {\tagName\0.5\#1}, {\tagName\#1\0.5}
Empty tag{tagName\}, {tagName\#1\}, {tagName\0.5\}, {tagName\0.5\#1\}, {tagName\#1\0.5\}
Single closing tag{\}
All closing tag{\\}