reckfellENGINE

Label3D

A node for displaying plain text in 3D space.

On this page
class Label3DReckfellSharpInherits GeometryInstance3D

A node for displaying plain text in 3D space.

A node for displaying plain text in 3D space. By adjusting various properties of this node, you can configure things such as the text's appearance and whether it always faces the camera.

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

Constructors1

Label3DConstructor
# Label3D
C#
public Label3D();

Properties33

AlphaAntialiasingEdgeProperty
# AlphaAntialiasingEdge
C#
public float AlphaAntialiasingEdge { get; set; }

Threshold at which antialiasing will be applied on the alpha channel.

AlphaAntialiasingModeProperty
# AlphaAntialiasingMode
C#
public BaseMaterial3D.AlphaAntiAliasing AlphaAntialiasingMode { get; set; }

The type of alpha antialiasing to apply.

AlphaCutProperty
# AlphaCut
C#
public Label3D.AlphaCutMode AlphaCut { get; set; }

The alpha cutting mode to use for the sprite.

AlphaHashScaleProperty
# AlphaHashScale
C#
public float AlphaHashScale { get; set; }

The hashing scale for Alpha Hash. Recommended values between 0 and 2.

AlphaScissorThresholdProperty
# AlphaScissorThreshold
C#
public float AlphaScissorThreshold { get; set; }

Threshold at which the alpha scissor will discard values.

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.

AutowrapTrimFlagsProperty
# AutowrapTrimFlags
C#
public TextServer.LineBreakFlag AutowrapTrimFlags { get; set; }

Autowrap space trimming flags. See TextServer.LineBreakFlag.TrimStartEdgeSpaces and TextServer.LineBreakFlag.TrimEndEdgeSpaces for more info.

BillboardProperty
# Billboard
C#
public BaseMaterial3D.BillboardModeEnum Billboard { get; set; }

Camera-facing mode. Enabled faces the viewer; FixedY preserves the vertical axis. Depth visibility and apparent-size stability are controlled by separate properties.

DoubleSidedProperty
# DoubleSided
C#
public bool DoubleSided { get; set; }

If true, text can be seen from the back as well, if false, it is invisible when looking at it from behind.

FixedSizeProperty
# FixedSize
C#
public bool FixedSize { get; set; }

Reduces apparent-size changes as perspective-camera distance changes. Not a guarantee of identical pixels across FOV, DPI or window sizes. Use Control for screen UI.

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

Font configuration used to display text.

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

Font size used to build the label. World dimensions also depend on PixelSize and the Entity3D transform. Raising FontSize while reducing PixelSize is not a universal substitute for font and rendering-quality selection.

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.

ModulateProperty
# Modulate
C#
public Color Modulate { get; set; }

Text Color of the Label3D.

NoDepthTestProperty
# NoDepthTest
C#
public bool NoDepthTest { get; set; }

Disables label depth testing so text can show through walls. Does not create screen UI or solve all transparent-object ordering. Keep false when walls should occlude the label.

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

The text drawing offset (in pixels).

OutlineModulateProperty
# OutlineModulate
C#
public Color OutlineModulate { get; set; }

The tint of text outline.

OutlineRenderPriorityProperty
# OutlineRenderPriority
C#
public int OutlineRenderPriority { get; set; }

Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. Note: This only applies if Label3D.AlphaCut is set to Label3D.AlphaCutMode.Disabled (default value). Note: This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).

OutlineSizeProperty
# OutlineSize
C#
public int OutlineSize { get; set; }

Text outline size.

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

Scale of a text pixel in 3D-world units. Together with FontSize it determines label geometry size, not screen-pixel size. A normal perspective label looks smaller at a distance.

RenderPriorityProperty
# RenderPriority
C#
public int RenderPriority { get; set; }

Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. Note: This only applies if Label3D.AlphaCut is set to Label3D.AlphaCutMode.Disabled (default value). Note: This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).

ShadedProperty
# Shaded
C#
public bool Shaded { get; set; }

If true, the Light3D in the Environment has effects on the label.

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; }

Text displayed in the 3D world. Changes queue a geometry update; reading render output immediately does not prove a new frame has been drawn. Choose a font covering the required language glyphs.

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

Base text writing direction.

TextureFilterProperty
# TextureFilter
C#
public BaseMaterial3D.TextureFilterEnum TextureFilter { get; set; }

Filter flags for the texture.

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 autowrap and fill alignment.

Methods61

GenerateTriangleMeshTriangleMesh
# GenerateTriangleMesh
C#
public TriangleMesh GenerateTriangleMesh();

Creates geometry for the rectangular text bounds. In the verified engine this is two triangles covering the label bounds, not glyph outlines. It does not automatically create a CollisionShape3D.

Returns TriangleMesh

A two-triangle TriangleMesh for the tested nonempty label, not extruded letters. Use TextMesh for glyph geometry.

GetAlphaAntialiasingBaseMaterial3D.AlphaAntiAliasing
# GetAlphaAntialiasing
C#
public BaseMaterial3D.AlphaAntiAliasing GetAlphaAntialiasing();
Returns BaseMaterial3D.AlphaAntiAliasing
GetAlphaAntialiasingEdgefloat
# GetAlphaAntialiasingEdge
C#
public float GetAlphaAntialiasingEdge();
Returns float
GetAlphaCutModeLabel3D.AlphaCutMode
# GetAlphaCutMode
C#
public Label3D.AlphaCutMode GetAlphaCutMode();
Returns Label3D.AlphaCutMode
GetAlphaHashScalefloat
# GetAlphaHashScale
C#
public float GetAlphaHashScale();
Returns float
GetAlphaScissorThresholdfloat
# GetAlphaScissorThreshold
C#
public float GetAlphaScissorThreshold();
Returns float
GetAutowrapModeTextServer.AutowrapMode
# GetAutowrapMode
C#
public TextServer.AutowrapMode GetAutowrapMode();
Returns TextServer.AutowrapMode
GetAutowrapTrimFlagsTextServer.LineBreakFlag
# GetAutowrapTrimFlags
C#
public TextServer.LineBreakFlag GetAutowrapTrimFlags();
Returns TextServer.LineBreakFlag
GetBillboardModeBaseMaterial3D.BillboardModeEnum
# GetBillboardMode
C#
public BaseMaterial3D.BillboardModeEnum GetBillboardMode();
Returns BaseMaterial3D.BillboardModeEnum
GetDrawFlagbool
# GetDrawFlag
C#
public bool GetDrawFlag(Label3D.DrawFlags flag);

Returns the value of the specified flag.

Parameters
NameTypeDefault
flagLabel3D.DrawFlags—
Returns bool
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
GetModulateColor
# GetModulate
C#
public Color GetModulate();
Returns Color
GetOffsetVector2
# GetOffset
C#
public Vector2 GetOffset();
Returns Vector2
GetOutlineModulateColor
# GetOutlineModulate
C#
public Color GetOutlineModulate();
Returns Color
GetOutlineRenderPriorityint
# GetOutlineRenderPriority
C#
public int GetOutlineRenderPriority();
Returns int
GetOutlineSizeint
# GetOutlineSize
C#
public int GetOutlineSize();
Returns int
GetPixelSizefloat
# GetPixelSize
C#
public float GetPixelSize();
Returns float
GetRenderPriorityint
# GetRenderPriority
C#
public int GetRenderPriority();
Returns int
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
GetTextureFilterBaseMaterial3D.TextureFilterEnum
# GetTextureFilter
C#
public BaseMaterial3D.TextureFilterEnum GetTextureFilter();
Returns BaseMaterial3D.TextureFilterEnum
GetVerticalAlignmentVerticalAlignment
# GetVerticalAlignment
C#
public VerticalAlignment GetVerticalAlignment();
Returns VerticalAlignment
GetWidthfloat
# GetWidth
C#
public float GetWidth();
Returns float
IsUppercasebool
# IsUppercase
C#
public bool IsUppercase();
Returns bool
SetAlphaAntialiasingvoid
# SetAlphaAntialiasing
C#
public void SetAlphaAntialiasing(BaseMaterial3D.AlphaAntiAliasing alphaAA);
Parameters
NameTypeDefault
alphaAABaseMaterial3D.AlphaAntiAliasing—
SetAlphaAntialiasingEdgevoid
# SetAlphaAntialiasingEdge
C#
public void SetAlphaAntialiasingEdge(float edge);
Parameters
NameTypeDefault
edgefloat—
SetAlphaCutModevoid
# SetAlphaCutMode
C#
public void SetAlphaCutMode(Label3D.AlphaCutMode mode);
Parameters
NameTypeDefault
modeLabel3D.AlphaCutMode—
SetAlphaHashScalevoid
# SetAlphaHashScale
C#
public void SetAlphaHashScale(float threshold);
Parameters
NameTypeDefault
thresholdfloat—
SetAlphaScissorThresholdvoid
# SetAlphaScissorThreshold
C#
public void SetAlphaScissorThreshold(float threshold);
Parameters
NameTypeDefault
thresholdfloat—
SetAutowrapModevoid
# SetAutowrapMode
C#
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);
Parameters
NameTypeDefault
autowrapModeTextServer.AutowrapMode—
SetAutowrapTrimFlagsvoid
# SetAutowrapTrimFlags
C#
public void SetAutowrapTrimFlags(TextServer.LineBreakFlag autowrapTrimFlags);
Parameters
NameTypeDefault
autowrapTrimFlagsTextServer.LineBreakFlag—
SetBillboardModevoid
# SetBillboardMode
C#
public void SetBillboardMode(BaseMaterial3D.BillboardModeEnum mode);
Parameters
NameTypeDefault
modeBaseMaterial3D.BillboardModeEnum—
SetDrawFlagvoid
# SetDrawFlag
C#
public void SetDrawFlag(Label3D.DrawFlags flag, bool enabled);

If true, the specified flag will be enabled.

Parameters
NameTypeDefault
flagLabel3D.DrawFlags—
enabledbool—
SetFontvoid
# SetFont
C#
public void SetFont(Font font);
Parameters
NameTypeDefault
fontFont—
SetFontSizevoid
# SetFontSize
C#
public void SetFontSize(int size);
Parameters
NameTypeDefault
sizeint—
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—
SetModulatevoid
# SetModulate
C#
public void SetModulate(Color modulate);
Parameters
NameTypeDefault
modulateColor—
SetOffsetvoid
# SetOffset
C#
public void SetOffset(Vector2 offset);
Parameters
NameTypeDefault
offsetVector2—
SetOutlineModulatevoid
# SetOutlineModulate
C#
public void SetOutlineModulate(Color modulate);
Parameters
NameTypeDefault
modulateColor—
SetOutlineRenderPriorityvoid
# SetOutlineRenderPriority
C#
public void SetOutlineRenderPriority(int priority);
Parameters
NameTypeDefault
priorityint—
SetOutlineSizevoid
# SetOutlineSize
C#
public void SetOutlineSize(int outlineSize);
Parameters
NameTypeDefault
outlineSizeint—
SetPixelSizevoid
# SetPixelSize
C#
public void SetPixelSize(float pixelSize);
Parameters
NameTypeDefault
pixelSizefloat—
SetRenderPriorityvoid
# SetRenderPriority
C#
public void SetRenderPriority(int priority);
Parameters
NameTypeDefault
priorityint—
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—
SetTextureFiltervoid
# SetTextureFilter
C#
public void SetTextureFilter(BaseMaterial3D.TextureFilterEnum mode);
Parameters
NameTypeDefault
modeBaseMaterial3D.TextureFilterEnum—
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—

Label3D.AlphaCutMode

ValueDescription
Disabled = 0

This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. GeometryInstance3D.CastShadow has no effect when this transparency mode is used; the Label3D will never cast shadows.

Discard = 1

This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa). This mode is also known as alpha testing or 1-bit transparency. Note: This mode might have issues with anti-aliased fonts and outlines, try adjusting Label3D.AlphaScissorThreshold or using MSDF font. Note: When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.

Hash = 3

This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.

OpaquePrepass = 2

This mode draws fully opaque pixels in the depth prepass. This is slower than Label3D.AlphaCutMode.Disabled or Label3D.AlphaCutMode.Discard, but it allows displaying translucent areas and smooth edges while using proper sorting. Note: When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.

Label3D.DrawFlags

ValueDescription
DisableDepthTest = 2

Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.

DoubleSided = 1

If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.

FixedSize = 3

Label is scaled by depth so that it always appears the same size on screen.

Max = 4

Represents the size of the Label3D.DrawFlags enum.

Shaded = 0

If set, lights in the environment affect the label.

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.