reckfellENGINE

TextMesh

Generate a PrimitiveMesh from the text.

On this page
class TextMeshReckfellSharpInherits PrimitiveMesh

Generate a PrimitiveMesh from the text.

Generate a PrimitiveMesh from the text. TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported. The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TextMeshConstructor
# TextMesh
C#
public TextMesh();

Properties18

AutowrapModeProperty
# AutowrapMode
C#
public TextServer.AutowrapMode AutowrapMode { get; set; }

If set to something other than TextServer.AutowrapMode.Off, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text.

CurveStepProperty
# CurveStep
C#
public float CurveStep { get; set; }

Step (in pixels) used to approximate Bézier curves. Lower values result in smoother curves, but is slower to generate and render. Consider adjusting this according to the font size and the typical viewing distance. Note: Changing this property will regenerate the mesh, which is a slow operation, especially with large font sizes and long texts.

DepthProperty
# Depth
C#
public float Depth { get; set; }

Glyph extrusion depth in mesh units, extending to both sides of the text plane. Not a shadow, collider or Label3D thickness. Assign TextMesh to a MeshInstance3D and create physics separately if needed.

FontProperty
# Font
C#
public Font Font { get; set; }

Font configuration used to display text.

FontSizeProperty
# FontSize
C#
public int FontSize { get; set; }

Font size of the TextMesh's text. This property works in tandem with TextMesh.PixelSize. Higher values will result in a more detailed font, regardless of TextMesh.CurveStep and TextMesh.PixelSize. Consider keeping this value below 63 (inclusive) for good performance, and adjust TextMesh.PixelSize as needed to enlarge text. Note: Changing this property will regenerate the mesh, which is a slow operation, especially with large font sizes and long texts. To change the text's size in real-time efficiently, change the node's Entity3D.Scale instead.

HorizontalAlignmentProperty
# HorizontalAlignment
C#
public HorizontalAlignment HorizontalAlignment { get; set; }

Controls the text's horizontal alignment. Supports left, center, right, and fill (also known as justify).

JustificationFlagsProperty
# JustificationFlags
C#
public TextServer.JustificationFlag JustificationFlags { get; set; }

Line fill alignment rules.

LanguageProperty
# Language
C#
public string Language { get; set; }

Language code used for line-breaking and text shaping algorithms. If left empty, the current locale is used instead.

LineSpacingProperty
# LineSpacing
C#
public float LineSpacing { get; set; }

Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.

OffsetProperty
# Offset
C#
public Vector2 Offset { get; set; }

The text drawing offset (in pixels). Note: Changing this property will regenerate the mesh, which is a slow operation. To change the text's position in real-time efficiently, change the node's Entity3D.Position instead.

PixelSizeProperty
# PixelSize
C#
public float PixelSize { get; set; }

Font-pixel scale in mesh units. Combines with FontSize for glyph width and height; Depth controls thickness separately. Screen size also depends on transforms and the camera.

StructuredTextBidiOverrideProperty
# StructuredTextBidiOverride
C#
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }

Set BiDi algorithm override for the structured text.

StructuredTextBidiOverrideOptionsProperty
# StructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }

Set additional options for BiDi override.

TextProperty
# Text
C#
public string Text { get; set; }

The text to generate mesh from. Note: Due to being a Resource, it doesn't follow the rules of Entity.AutoTranslateMode. If disabling translation is desired, it should be done manually with ReckfellObject.SetMessageTranslation.

TextDirectionProperty
# TextDirection
C#
public TextServer.Direction TextDirection { get; set; }

Base text writing direction.

UppercaseProperty
# Uppercase
C#
public bool Uppercase { get; set; }

If true, all the text displays as UPPERCASE.

VerticalAlignmentProperty
# VerticalAlignment
C#
public VerticalAlignment VerticalAlignment { get; set; }

Controls the text's vertical alignment. Supports top, center, and bottom.

WidthProperty
# Width
C#
public float Width { get; set; }

Text width (in pixels), used for fill alignment.

Methods36

GetAutowrapModeTextServer.AutowrapMode
# GetAutowrapMode
C#
public TextServer.AutowrapMode GetAutowrapMode();
Returns TextServer.AutowrapMode
GetCurveStepfloat
# GetCurveStep
C#
public float GetCurveStep();
Returns float
GetDepthfloat
# GetDepth
C#
public float GetDepth();
Returns float
GetFontFont
# GetFont
C#
public Font GetFont();
Returns Font
GetFontSizeint
# GetFontSize
C#
public int GetFontSize();
Returns int
GetHorizontalAlignmentHorizontalAlignment
# GetHorizontalAlignment
C#
public HorizontalAlignment GetHorizontalAlignment();
Returns HorizontalAlignment
GetJustificationFlagsTextServer.JustificationFlag
# GetJustificationFlags
C#
public TextServer.JustificationFlag GetJustificationFlags();
Returns TextServer.JustificationFlag
GetLanguagestring
# GetLanguage
C#
public string GetLanguage();
Returns string
GetLineSpacingfloat
# GetLineSpacing
C#
public float GetLineSpacing();
Returns float
GetOffsetVector2
# GetOffset
C#
public Vector2 GetOffset();
Returns Vector2
GetPixelSizefloat
# GetPixelSize
C#
public float GetPixelSize();
Returns float
GetStructuredTextBidiOverrideTextServer.StructuredTextParser
# GetStructuredTextBidiOverride
C#
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();
Returns TextServer.StructuredTextParser
GetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
# GetStructuredTextBidiOverrideOptions
C#
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();
Returns Reckfell.Collections.Array
GetTextstring
# GetText
C#
public string GetText();
Returns string
GetTextDirectionTextServer.Direction
# GetTextDirection
C#
public TextServer.Direction GetTextDirection();
Returns TextServer.Direction
GetVerticalAlignmentVerticalAlignment
# GetVerticalAlignment
C#
public VerticalAlignment GetVerticalAlignment();
Returns VerticalAlignment
GetWidthfloat
# GetWidth
C#
public float GetWidth();
Returns float
IsUppercasebool
# IsUppercase
C#
public bool IsUppercase();
Returns bool
SetAutowrapModevoid
# SetAutowrapMode
C#
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);
Parameters
NameTypeDefault
autowrapModeTextServer.AutowrapMode—
SetCurveStepvoid
# SetCurveStep
C#
public void SetCurveStep(float curveStep);
Parameters
NameTypeDefault
curveStepfloat—
SetDepthvoid
# SetDepth
C#
public void SetDepth(float depth);
Parameters
NameTypeDefault
depthfloat—
SetFontvoid
# SetFont
C#
public void SetFont(Font font);
Parameters
NameTypeDefault
fontFont—
SetFontSizevoid
# SetFontSize
C#
public void SetFontSize(int fontSize);
Parameters
NameTypeDefault
fontSizeint—
SetHorizontalAlignmentvoid
# SetHorizontalAlignment
C#
public void SetHorizontalAlignment(HorizontalAlignment alignment);
Parameters
NameTypeDefault
alignmentHorizontalAlignment—
SetJustificationFlagsvoid
# SetJustificationFlags
C#
public void SetJustificationFlags(TextServer.JustificationFlag justificationFlags);
Parameters
NameTypeDefault
justificationFlagsTextServer.JustificationFlag—
SetLanguagevoid
# SetLanguage
C#
public void SetLanguage(string language);
Parameters
NameTypeDefault
languagestring—
SetLineSpacingvoid
# SetLineSpacing
C#
public void SetLineSpacing(float lineSpacing);
Parameters
NameTypeDefault
lineSpacingfloat—
SetOffsetvoid
# SetOffset
C#
public void SetOffset(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetPixelSizevoid
# SetPixelSize
C#
public void SetPixelSize(float pixelSize);
Parameters
NameTypeDefault
pixelSizefloat—
SetStructuredTextBidiOverridevoid
# SetStructuredTextBidiOverride
C#
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);
Parameters
NameTypeDefault
parserTextServer.StructuredTextParser—
SetStructuredTextBidiOverrideOptionsvoid
# SetStructuredTextBidiOverrideOptions
C#
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);
Parameters
NameTypeDefault
argsReckfell.Collections.Array—
SetTextvoid
# SetText
C#
public void SetText(string text);
Parameters
NameTypeDefault
textstring—
SetTextDirectionvoid
# SetTextDirection
C#
public void SetTextDirection(TextServer.Direction direction);
Parameters
NameTypeDefault
directionTextServer.Direction—
SetUppercasevoid
# SetUppercase
C#
public void SetUppercase(bool enable);
Parameters
NameTypeDefault
enablebool—
SetVerticalAlignmentvoid
# SetVerticalAlignment
C#
public void SetVerticalAlignment(VerticalAlignment alignment);
Parameters
NameTypeDefault
alignmentVerticalAlignment—
SetWidthvoid
# SetWidth
C#
public void SetWidth(float width);
Parameters
NameTypeDefault
widthfloat—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.