This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Text Object

A text object is an object representing a plain text in a 3D space. The text is rendered into a texture that is applied to a flat polygon. It uses trilinear filtering and mipmaps to correctly display the text at any distance. There is no noise influence to the object and it is not distorted by TAA.

The font can be represented as a TrueType font (TTF) or as a texture atlas with letters.

See Also

  • An ObjectText class to edit text objects via UnigineScript

Adding a Text Object

To add a text object to the scene via UnigineEditor, do the following:

  1. Run the project with UnigineEditor.
  2. On the Menu bar, click Create -> Object -> Text.

  3. Place the text object somewhere in the world.

Editing a Text Object

Text Text input field. If the Rich text option is enabled, you can use tags for text formatting.
Name Path to a *.ttf file or to a texture atlas with letters.
Notice
Names of font files for bold, italic and bold italic fonts must have the b, i and bi postfixes correspondingly. For example: myfontb.ttf, myfontbi.ttf.
Color Font color in the RGBA range.
Wrap Width Text wrap width in units. The text will wrap if its physical size will be greater than the set value. If 0 is set, text wrapping is disabled.
Wrap Width = 0
Wrap Width = 5
Size Font size, in dots. The more dots, the higher the size of the font.To match dots with a 3D space, there is a set value: 288 dots per unit. For example, if you have the Arial font with the size of 20, the physical height of the letter can be calculated as 20/288=0.0694 units.
Resolution Resolution of the texture into which the text will be rendered. The lower the value, the less detailed will be the text and the less video memory will be required for the texture.
Notice
The resolution doesn't influence the text's physical size.
Resolution = 50
Resolution = 200
HSpacing Horizontal spacing between letters (a kerning value). This parameter affects the text's physical size.
VSpasing Vertical spacing between letters (a kerning value). This parameter affects the text's physical size.
Rich text Flag indicating if the rich text formatting is enabled.
Outline Flag indicating in the text outline is enabled. The outline looks like the dark shadow in the right lower corner of the text and is displaced by one dot.
Last update: 2017-07-03
Build: ()