Skip to main content

Text

info
  • This class is only available in a Local environment

The Text class is a component which interacts with Unity Text on UI and 3D.

caution

The Text class is only compatible with TextMeshPro.

To get a Text component from an item, use the GetComponent method.

let textComponent = item.GetComponent("Text")

You can then use the textComponent property to access the Text class.

Methods

Method NameReturn TypeParametersDescription
GetTextstringnoneGets the current text
SetTextvoidstringSets the current text

Properties

Property NameTypeDescription
RichTextboolWhether or not the Text component can use RichText