Version: 1.3
语言 : 中文
Font Asset Creator properties reference
Include sprites in text

Style sheets

If you want to reuse a style, create a custom style sheet for it, and apply it to text through the <style> rich text tag.

A custom style can include opening and closing rich text tags, and leading and trailing text.

For example, you might want headings in your text to be big, red, bold, with an asterisk to either side and a line break at the end.

Instead of typing this for every heading:

<font-weight=700><size=2em><color=#FF0000>*Heading*</color></size></font-weight><br>

You can create a style, called H1 that includes all of that formatting, and then apply the style to your headings.

For instructions on how to create a custom style sheet, see Style-with-style-sheets in Get started with text

To use a custom style sheet in the rich text tag, reference the style sheet asset name and the style name: <style="assetName" name="styleName">.

For runtime UI, if you have set a style sheet as the default style sheet in the Panel Text Settings, you can omit the asset name: <style="styleName">. For example: <style="H1">This is heading 1</style>.

其他资源

Font Asset Creator properties reference
Include sprites in text