Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

alignmentHow lines of text are aligned (Left, Right, Center).
anchorWhich point of the text shares the position of the Transform.
characterSizeThe size of each character (This scales the whole text).
colorThe color used to render the text.
fontThe Font used.
fontSizeThe font size to use (for dynamic fonts).
fontStyleThe font style to use (for dynamic fonts).
lineSpacingHow much space will be in-between lines of text.
offsetZHow far should the text be offset from the transform.position.z when drawing.
richTextEnable HTML-style tags for Text Formatting Markup.
tabSizeHow much space will be inserted for a tab '\t' character. This is a multiplum of the 'spacebar' character offset.
textThe text that is displayed.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.