Controls a text rendering texture. Can be accessed through the main rendering pass on a Text component. The properties here mirror those on Text.

// Sets the text to be used on a label's text rendering texture

//@input Component.Label label

var control = script.label.mainPass.baseTex.control;
control.text = "New Text";

Hierarchy (View Summary, Expand)

Constructors

Properties

fontAsset: Font

The font used for rendering text.

outlineColor: vec4

The color used for the outline effect.

outlineSize: number

The strength of the outline effect.

shadowColor: vec4

The color used for dropshadow.

shadowOffset: vec2

The horizontal and vertical offset used for dropshadow.

size: number

The font size being used.

text: string

The text being rendered.

textColor: vec4

The color for rendering text.

useDropshadow: boolean

If enabled, adds a dropshadow to the text.

useOutline: boolean

If enabled, renders an outline around the text.

Methods

  • Returns the texture's aspect ratio, which is calculated as width / height.

    Returns number

  • Returns the width of the texture in pixels.

    Returns number

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

MMNEPVFCICPMFPCPTTAAATR