Skip to main content

Text

info

Text inherits from Component

The default Graphic to draw font data to screen.

Members

Properties

NameDescription
Text.alignByGeometryUse the extents of glyph geometry to perform horizontal alignment rather than glyph metrics.
Text.alignmentThe positioning of the text reliative to its RectTransform.
Text.colorThe text color
Text.fontSizeThe size that the Font should render at.
Text.fontStyleFontStyle used by the text.
Text.lineSpacingLine spacing, specified as a factor of font line height. A value of 1 will produce normal line spacing.
Text.supportRichTextWhether this Text will support rich text.
Text.textThe string value this Text displays.

Inherited Members

Inherited Properties

NameDescription
Text.gameObjectThe game object this component is attached to. A component is always attached to a game object.
Text.tagThe tag of this game object.
Text.transformThe Transform attached to this GameObject.
Text.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
Text.nameThe name of the object.

Inherited Methods

NameDescription
Text.BroadcastMessage(methodName, parameter=nil)Calls the method named methodName on every Lua Script in this game object or any of its children.
Text.CompareTag(tag)Is this game object tagged with tag ?
Text.GetAllLuaScripts()Returns an array of all Lua scripts that attached to the game object.
Text.GetComponent(type)Returns the component of Type type if the game object has one attached, nil if it doesn't.
Text.GetComponentInChildren(t)Returns the component of Type type in the GameObject or any of its children using depth first search.
Text.GetComponentInParent(t)Returns the component of Type type in the GameObject or any of its parents.
Text.GetComponents(type)Returns all components of Type type in the GameObject.
Text.GetComponentsInChildren(t)Returns all components of Type type in the GameObject or any of its children.
Text.GetComponentsInParent(t)Returns all components of Type type in the GameObject or any of its parents.
Text.SendMessage(methodName, value=nil)Calls the method named methodName on every Lua Script in this game object.
Text.SendMessageUpwards(methodName, value=nil)Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
Text.TryGetComponent(type)Gets the component of the specified type, if it exists.
Text.GetInstanceID()Returns the instance id of the object.