This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

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.Объект Text - это объект, представляющий простой текст в трехмерном пространстве. Текст преобразуется в текстуру, которая накладывается на плоский многоугольник. Он использует трилинейную фильтрацию и MIP-карты для правильного отображения текста на любом расстоянии. Отсутствует влияние шума на объект и искажается от TAA.

The font can be represented as a TrueType font (TTF) or as a texture atlas with letters.Шрифт может быть представлен как шрифт TrueType (TTF) или как текстурный атлас с буквами.

See AlsoСмотрите также#

  • The ObjectText class to edit text objects via APIКласс ObjectText для редактирования объектов Text через API

Adding a Text ObjectДобавление текстового объекта#

To add a text object to the scene via UnigineEditor, do the following:Чтобы добавить объект Text в сцену через UnigineEditor, сделайте следующее:

  1. Run the project with UnigineEditor.Запустить проект с UnigineEditor.
  2. On the Menu bar, click Create -> Text.

    В строке меню щелкнитеCreate -> Text.

  3. Place the Text object somewhere in the world.Разместите объект Text где-нибудь в мире.

Editing a Text ObjectРедактирование текстового объекта#

Text Text input field. If the Rich text option is enabled, you can use tags for text formatting.Поле ввода текста. Если опция Rich text включена, вы можете использовать теги для форматирования текста.
Name Path to a *.ttf file or to a texture atlas with letters.
Примечание
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.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.
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.
Путь к файлу *.ttf или к атласу текстур с буквами.
Примечание
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.Имена файлов шрифтов для полужирных, курсивных и полужирных курсивных шрифтов должны иметь постфиксы b, i и bi соответственно. Например: myfontb.ttf, myfontbi.ttf.
Color Text color in the RGBA range.Цвет текста в диапазоне RGBA.
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 = 0Wrap Width = 0
Wrap Width = 5Wrap Width = 5
Wrap Width = 0Wrap Width = 5
Ширина обтекания текстом в единицах. Текст будет переноситься, если его физический размер будет больше установленного значения. Если установлено 0, перенос текста отключен.
Wrap Width = 0Ширина намотки = 0
Wrap Width = 5Ширина намотки = 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.Размер шрифта в точках. Чем больше точек, тем больше размер шрифта. Чтобы сопоставить точки с трехмерным пространством, существует установленное значение: 288 точек на единицу. Например, если у вас есть шрифт Arial с размером 20, физическая высота буквы может быть рассчитана как 20/288 = 0,0694 единицы.
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.
Примечание
The resolution doesn't influence the text's physical size.The resolution doesn't influence the text's physical size.
Resolution = 50Resolution = 50
Resolution = 200Resolution = 200
The resolution doesn't influence the text's physical size.Resolution = 50Resolution = 200
Разрешение текстуры, в которой будет отображаться текст. Чем ниже значение, тем менее детализированным будет текст и тем меньше потребуется видеопамяти для текстуры.
Примечание
The resolution doesn't influence the text's physical size.Разрешение не влияет на физический размер текста.
Resolution = 50Разрешение = 50
Resolution = 200Разрешение = 200
HSpacing Horizontal spacing between letters (a kerning value). This parameter affects the text's physical size.Расстояние между буквами по горизонтали (значение кернинга). Этот параметр влияет на физический размер текста.
VSpacing 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. The following tags are supported:
  • <b>text</b> specifies a bold text.<b>text</b> specifies a bold text.
  • <i>text</i> specifies an italic text.<i>text</i> specifies an italic text.
  • <br>text</br> inserts a single line break.<br>text</br> inserts a single line break.
  • <left>text</left> left-aligns the text.<left>text</left> left-aligns the text.
  • <right>text</right> right-aligns the text.<right>text</right> right-aligns the text.
  • <center>text</center> center-aligns the text.<center>text</center> center-aligns the text.
  • <p align=left|right|center|justify>text</p> specifies the alignment of the text within a paragraph:
    • left — left-aligns the textleft — left-aligns the text
    • right — right-aligns the textright — right-aligns the text
    • center — center-aligns the textcenter — center-aligns the text
    • justify — stretches the lines so that each line has equal width (like in newspapers and magazines)justify — stretches the lines so that each line has equal width (like in newspapers and magazines)
    Примечание
    Text alignment requires text wrapping to be enabled: the value of the Wrap Width parameter must be greater than 0.Text alignment requires text wrapping to be enabled: the value of the Wrap Width parameter must be greater than 0.
  • <font size=12 color=magenta face=verdana> text</font> specifies the font face, font size, and color of text.<font size=12 color=magenta face=verdana> text</font> specifies the font face, font size, and color of text.
  • <sub> text</sub> defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.<sub> text</sub> defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.
  • <sup> text</sup> defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.<sup> text</sup> defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.
Примечание
<image/> and <table/> tags are not available.<image/> and <table/> tags are not available.
<b>text</b> specifies a bold text.<i>text</i> specifies an italic text.<br>text</br> inserts a single line break.<left>text</left> left-aligns the text.<right>text</right> right-aligns the text.<center>text</center> center-aligns the text.left — left-aligns the textright — right-aligns the textcenter — center-aligns the textjustify — stretches the lines so that each line has equal width (like in newspapers and magazines)Text alignment requires text wrapping to be enabled: the value of the Wrap Width parameter must be greater than 0.<font size=12 color=magenta face=verdana> text</font> specifies the font face, font size, and color of text.<sub> text</sub> defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.<sup> text</sup> defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.<image/> and <table/> tags are not available.
Флаг, указывающий, включено ли форматирование текста в формате RTF. Поддерживаются следующие теги:
  • <b>text</b> specifies a bold text.<b> текст </b>указывает полужирный текст.
  • <i>text</i> specifies an italic text.<i> текст </i>указывает курсивный текст.
  • <br>text</br> inserts a single line break.<br> текст </br>вставляет одинарный разрыв строки.
  • <left>text</left> left-aligns the text.<left> текст </left>выравнивает текст по левому краю.
  • <right>text</right> right-aligns the text.<right> текст </right>выравнивает текст по правому краю.
  • <center>text</center> center-aligns the text.<center> текст </center>выравнивает текст по центру.
  • <p align=left|right|center|justify>text</p>задает выравнивание текста внутри абзаца:
    • left — left-aligns the textоставил- выравнивает текст по левому краю
    • right — right-aligns the textверно- выравнивает текст по правому краю
    • center — center-aligns the textцентр- выравнивает текст по центру
    • justify — stretches the lines so that each line has equal width (like in newspapers and magazines)оправдывать- растягивает линии так, чтобы каждая линия имела одинаковую ширину (как в газетах и журналах)
    Примечание
    Text alignment requires text wrapping to be enabled: the value of the Wrap Width parameter must be greater than 0.Для выравнивания текста необходимо включить перенос текста: значение параметра Wrap Width должно быть больше 0.
  • <font size=12 color=magenta face=verdana> text</font> specifies the font face, font size, and color of text.<font size = 12 color = magenta face = verdana> текст </font>определяет шрифт, размер шрифта и цвет текста.
  • <sub> text</sub> defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font.<sub> текст </sub>определяет подстрочный текст. Подстрочный текст отображается на полсимвола ниже нормальной строки и иногда отображается более мелким шрифтом.
  • <sup> text</sup> defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font.<sup> текст </sup>определяет надстрочный текст. Надстрочный текст появляется на полсимвола над нормальной линией и иногда отображается более мелким шрифтом.
Примечание
<image/> and <table/> tags are not available.Теги <image/> и <table/> недоступны.
Depth Test Flag indicating if depth test is performed for the text.Флаг, указывающий, выполняется ли проверка глубины текста.
Outline Flag indicating if 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.Флаг, указывающий, включен ли контур текста. Контур выглядит как темная тень в правом нижнем углу текста и смещен на одну точку.
Последнее обновление: 29.04.2021
Build: ()