Skip to content

TextController

rech edited this page Jun 15, 2026 · 1 revision

Description

Controller for a text object.

Remarks

Inherited from Controller

Properties


Name Type Description
active ValueChannel value 1 means object is enabled, 0 means object is disabled
translationX ValueChannel The text's position
translationY ValueChannel The text's position
translationZ ValueChannel The text's position
rotationX ValueChannel The text's rotation
rotationY ValueChannel The text's rotation
rotationZ ValueChannel The text's rotation
scaleX ValueChannel The text's scaling
scaleY ValueChannel The text's scaling
scaleZ ValueChannel The text's scaling
colorR ValueChannel The text's color
colorG ValueChannel The text's color
colorB ValueChannel The text's color
colorA ValueChannel The text's color
colorH ValueChannel Hue shift modification of the color
colorS ValueChannel Saturation modification of the color
colorV ValueChannel Brightness modification of the color
rectW ValueChannel The text's width
rectH ValueChannel The text's height
anchorMinX ValueChannel The text's rect transform anchor
anchorMinY ValueChannel The text's rect transform anchor
anchorMaxX ValueChannel The text's rect transform anchor
anchorMaxY ValueChannel The text's rect transform anchor
pivotX ValueChannel The text's rect transform pivot
pivotY ValueChannel The text's rect transform pivot
text TextChannel The text's content
fontSize ValueChannel The text's font size
lineSpacing ValueChannel The text's line spacing
font StringChannel The text's font

Remarks

anchorMinX, anchorMinY, anchorMaxX, anchorMaxY will affect how width and height will convert into actual size of the object.

pivotX, pivotY will affect how translationX and translationY will convert into actual position of the object.

font must be a name of a font already installed on the user's operating system.

Methods


copy()

Description

Create a copy of this controller, along with all of its children.

Parameters

_

Return types

TextController

Remarks

A copied controller will never be persistent.

Example

local txt = Scene.createText("Hello")
local copy = txt.copy()

getChildren()

Description

Return all controllers parented to this controller.

Parameters

_

Return types

Table of Controller

Remarks

_

Example

local children = txt.getChildren()

setParent(controller)

Description

Set the parent to another controller.

Parameters

Name Type Description
controller Controller The controller to parent to

Return types

nil

Remarks

_

Example

local txt = Scene.createText("Hello")
txt.setParent(Scene.worldCanvas)

Clone this wiki locally