• Creates a text component for UI object.

    Parameters

    • text: string

      Text to show.

    • textSize: number

      Size of text in metres.

    • textWidth: number

      Width of text.

    • textAlign: HorizontalAlignment

      Horizontal alignment of text. Use alignmentLeft, alignmentCenter or alignmentRight.

    • paddingLeft: number

      Size of padding on the left.

    • paddingRight: number

      Size of padding on the right.

    • paddingTop: number

      Size of padding on the top.

    • paddingBottom: number

      Size of padding on the bottom.

    • color: number

      Color of text.

    Returns UITextItem

    Created text component.