Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Text2DRenderer

Add this component to a text entity to specify the string text, the pivot, and a blending operation.

If you want to set the text inside of a RectTransform component, you must add both the RectTransform and a RectTransformFinalSize component to the entity with the Text2DRenderer.

If you want to auto-fit the text inside the RectTransform component, you must also add a Text2DAutoFit component, and make sure to schedule the SetRectTransformSizeSystem.

Hierarchy

Index

Constructors

constructor

Properties

blending

blending: BlendOp

BlendOp for rendering text. The default and regular mode is Alpha.

pivot

pivot: Vector2

The center point in the text, relative to the text's bottom-left corner, in unit rectangle coordinates

style

style: Entity

The entity on which to look for a Text2DStyle component to use as the Text style.

text

text: string

The text to display.

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static pivot

Static style

style: EntityComponentFieldDesc

Methods

Static _dtorFn

  • Parameters

    Returns void

Static _fromPtr

Static _tempHeapPtr

  • Parameters

    Returns number

Static _toPtr

  • Parameters

    Returns void

Generated using TypeDoc