TextMesh
A script interface for the text mesh component.
Read time 6 minutesLast updated 8 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.TextRenderingModule
- Inherits from: Component
[RequireComponent(typeof(Transform), typeof(MeshRenderer))]public sealed class TextMesh : Component
Remarks
Additional Resources: text mesh component.
Properties
Property | Description |
|---|---|
| alignment | How lines of text are aligned (Left, Right, Center). |
| anchor | Which point of the text shares the position of the Transform. |
| characterSize | The size of each character (This scales the whole text). |
| color | The color used to render the text. |
| font | The Font used. |
| fontSize | The font size to use (for dynamic fonts). |
| fontStyle | The font style to use (for dynamic fonts). |
| lineSpacing | How much space will be in-between lines of text. |
| offsetZ | How far should the text be offset from the transform.position.z when drawing. |
| richText | Enable HTML-style tags for Text Formatting Markup. |
| tabSize | How much space will be inserted for a tab '\t' character. This is a multiplum of the 'spacebar' character offset. |
| text | The text that is displayed. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |