Class TextRender
Text rendering object.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorContextMenu("New/UI/Text Render")]
[ActorToolbox("Visuals")]
[Unmanaged]
public class TextRender : Actor, ISerializable
Constructors
TextRender()
Properties
Color
Gets or sets the color of the text.
Declaration
[EditorOrder(10)]
[EditorDisplay("Text", null)]
[Unmanaged]
public Color Color { get; set; }
Property Value
|
Color
|
DrawModes
The draw passes to use for rendering this object.
Declaration
[EditorOrder(75)]
[EditorDisplay("Text", null)]
[Unmanaged]
public DrawPass DrawModes { get; set; }
Property Value
|
DrawPass
|
Font
The font asset used as a text characters source.
Declaration
[EditorOrder(30)]
[AssetReference(true)]
[EditorDisplay("Text", null)]
[Unmanaged]
public FontAsset Font { get; set; }
Property Value
|
FontAsset
|
FontSize
Gets or sets the font characters size.
Declaration
[EditorOrder(40)]
[Limit(1F, 1000F, 1F)]
[EditorDisplay("Text", null)]
[Unmanaged]
public float FontSize { get; set; }
Property Value
|
System.Single
|
LayoutOptions
Gets or sets the layout options. Layout is defined in local space of the object (on XY plane).
Declaration
[EditorOrder(100)]
[EditorDisplay("Text", null)]
[Unmanaged]
public TextLayoutOptions LayoutOptions { get; set; }
Property Value
|
TextLayoutOptions
|
LocalBox
Gets the axis=aligned bounding box of the text vertices in the local-space of the actor.
Declaration
[Unmanaged]
public BoundingBox LocalBox { get; }
Property Value
|
BoundingBox
|
Material
The material used for the text rendering. It must contain texture parameter named Font used to sample font texture.
Declaration
[EditorOrder(20)]
[AssetReference(true)]
[EditorDisplay("Text", null)]
[Unmanaged]
public MaterialBase Material { get; set; }
Property Value
|
MaterialBase
|
ShadowsMode
The shadows casting mode by this visual element.
Declaration
[EditorOrder(80)]
[EditorDisplay("Text", null)]
[Unmanaged]
public ShadowsCastingMode ShadowsMode { get; set; }
Property Value
|
ShadowsCastingMode
|
SortOrder
The object sort order key used when sorting drawable objects during rendering. Use lower values to draw object before others, higher values are rendered later (on top). Can be used to control transparency drawing.
Declaration
[EditorOrder(85)]
[EditorDisplay("Text", null)]
[Unmanaged]
public sbyte SortOrder { get; set; }
Property Value
|
System.SByte
|
Text
Gets or sets the text.
Declaration
[EditorOrder(0)]
[MultilineText]
[EditorDisplay("Text", null)]
[Unmanaged]
public LocalizedString Text { get; set; }
Property Value
|
LocalizedString
|
Methods
UpdateLayout()
Updates the text vertex buffer layout and cached data if its dirty.
Declaration
[Unmanaged]
public void UpdateLayout()