Label3D
A node for displaying plain text in 3D space.
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
public Label3D();Properties33
AlphaAntialiasingEdgeProperty
public float AlphaAntialiasingEdge { get; set; }Threshold at which antialiasing will be applied on the alpha channel.
AlphaAntialiasingModeProperty
public BaseMaterial3D.AlphaAntiAliasing AlphaAntialiasingMode { get; set; }The type of alpha antialiasing to apply.
AlphaCutProperty
public Label3D.AlphaCutMode AlphaCut { get; set; }The alpha cutting mode to use for the sprite.
AlphaHashScaleProperty
public float AlphaHashScale { get; set; }The hashing scale for Alpha Hash. Recommended values between 0 and 2.
AlphaScissorThresholdProperty
public float AlphaScissorThreshold { get; set; }Threshold at which the alpha scissor will discard values.
AutowrapModeProperty
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
public TextServer.LineBreakFlag AutowrapTrimFlags { get; set; }Autowrap space trimming flags. See TextServer.LineBreakFlag.TrimStartEdgeSpaces and TextServer.LineBreakFlag.TrimEndEdgeSpaces for more info.
BillboardProperty
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
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
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
public Font Font { get; set; }Font configuration used to display text.
FontSizeProperty
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
public HorizontalAlignment HorizontalAlignment { get; set; }Controls the text's horizontal alignment. Supports left, center, right, and fill (also known as justify).
JustificationFlagsProperty
public TextServer.JustificationFlag JustificationFlags { get; set; }Line fill alignment rules.
LanguageProperty
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
public float LineSpacing { get; set; }Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
ModulateProperty
public Color Modulate { get; set; }NoDepthTestProperty
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
public Vector2 Offset { get; set; }The text drawing offset (in pixels).
OutlineModulateProperty
public Color OutlineModulate { get; set; }The tint of text outline.
OutlineRenderPriorityProperty
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
public int OutlineSize { get; set; }Text outline size.
PixelSizeProperty
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
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
public bool Shaded { get; set; }If true, the Light3D in the Environment has effects on the label.
StructuredTextBidiOverrideProperty
public TextServer.StructuredTextParser StructuredTextBidiOverride { get; set; }Set BiDi algorithm override for the structured text.
StructuredTextBidiOverrideOptionsProperty
public Reckfell.Collections.Array StructuredTextBidiOverrideOptions { get; set; }Set additional options for BiDi override.
TextProperty
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
public TextServer.Direction TextDirection { get; set; }Base text writing direction.
TextureFilterProperty
public BaseMaterial3D.TextureFilterEnum TextureFilter { get; set; }Filter flags for the texture.
UppercaseProperty
public bool Uppercase { get; set; }If true, all the text displays as UPPERCASE.
VerticalAlignmentProperty
public VerticalAlignment VerticalAlignment { get; set; }Controls the text's vertical alignment. Supports top, center, and bottom.
WidthProperty
public float Width { get; set; }Text width (in pixels), used for autowrap and fill alignment.
Methods61
GenerateTriangleMeshTriangleMesh
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.
TriangleMeshA two-triangle TriangleMesh for the tested nonempty label, not extruded letters. Use TextMesh for glyph geometry.
GetAlphaAntialiasingBaseMaterial3D.AlphaAntiAliasing
public BaseMaterial3D.AlphaAntiAliasing GetAlphaAntialiasing();BaseMaterial3D.AlphaAntiAliasingGetAlphaAntialiasingEdgefloat
public float GetAlphaAntialiasingEdge();floatGetAlphaCutModeLabel3D.AlphaCutMode
public Label3D.AlphaCutMode GetAlphaCutMode();Label3D.AlphaCutModeGetAlphaHashScalefloat
public float GetAlphaHashScale();floatGetAlphaScissorThresholdfloat
public float GetAlphaScissorThreshold();floatGetAutowrapModeTextServer.AutowrapMode
public TextServer.AutowrapMode GetAutowrapMode();TextServer.AutowrapModeGetAutowrapTrimFlagsTextServer.LineBreakFlag
public TextServer.LineBreakFlag GetAutowrapTrimFlags();TextServer.LineBreakFlagGetBillboardModeBaseMaterial3D.BillboardModeEnum
public BaseMaterial3D.BillboardModeEnum GetBillboardMode();BaseMaterial3D.BillboardModeEnumGetDrawFlagbool
public bool GetDrawFlag(Label3D.DrawFlags flag);Returns the value of the specified flag.
| Name | Type | Default |
|---|---|---|
flag | Label3D.DrawFlags | — |
boolGetFontFont
public Font GetFont();FontGetFontSizeint
public int GetFontSize();intGetHorizontalAlignmentHorizontalAlignment
public HorizontalAlignment GetHorizontalAlignment();HorizontalAlignmentGetJustificationFlagsTextServer.JustificationFlag
public TextServer.JustificationFlag GetJustificationFlags();TextServer.JustificationFlagGetLanguagestring
public string GetLanguage();stringGetLineSpacingfloat
public float GetLineSpacing();floatGetModulateColor
public Color GetModulate();ColorGetOffsetVector2
public Vector2 GetOffset();Vector2GetOutlineModulateColor
public Color GetOutlineModulate();ColorGetOutlineRenderPriorityint
public int GetOutlineRenderPriority();intGetOutlineSizeint
public int GetOutlineSize();intGetPixelSizefloat
public float GetPixelSize();floatGetRenderPriorityint
public int GetRenderPriority();intGetStructuredTextBidiOverrideTextServer.StructuredTextParser
public TextServer.StructuredTextParser GetStructuredTextBidiOverride();TextServer.StructuredTextParserGetStructuredTextBidiOverrideOptionsReckfell.Collections.Array
public Reckfell.Collections.Array GetStructuredTextBidiOverrideOptions();Reckfell.Collections.ArrayGetTextstring
public string GetText();stringGetTextDirectionTextServer.Direction
public TextServer.Direction GetTextDirection();TextServer.DirectionGetTextureFilterBaseMaterial3D.TextureFilterEnum
public BaseMaterial3D.TextureFilterEnum GetTextureFilter();BaseMaterial3D.TextureFilterEnumGetVerticalAlignmentVerticalAlignment
public VerticalAlignment GetVerticalAlignment();VerticalAlignmentGetWidthfloat
public float GetWidth();floatIsUppercasebool
public bool IsUppercase();boolSetAlphaAntialiasingvoid
public void SetAlphaAntialiasing(BaseMaterial3D.AlphaAntiAliasing alphaAA);| Name | Type | Default |
|---|---|---|
alphaAA | BaseMaterial3D.AlphaAntiAliasing | — |
SetAlphaAntialiasingEdgevoid
public void SetAlphaAntialiasingEdge(float edge);| Name | Type | Default |
|---|---|---|
edge | float | — |
SetAlphaCutModevoid
public void SetAlphaCutMode(Label3D.AlphaCutMode mode);| Name | Type | Default |
|---|---|---|
mode | Label3D.AlphaCutMode | — |
SetAlphaHashScalevoid
public void SetAlphaHashScale(float threshold);| Name | Type | Default |
|---|---|---|
threshold | float | — |
SetAlphaScissorThresholdvoid
public void SetAlphaScissorThreshold(float threshold);| Name | Type | Default |
|---|---|---|
threshold | float | — |
SetAutowrapModevoid
public void SetAutowrapMode(TextServer.AutowrapMode autowrapMode);| Name | Type | Default |
|---|---|---|
autowrapMode | TextServer.AutowrapMode | — |
SetAutowrapTrimFlagsvoid
public void SetAutowrapTrimFlags(TextServer.LineBreakFlag autowrapTrimFlags);| Name | Type | Default |
|---|---|---|
autowrapTrimFlags | TextServer.LineBreakFlag | — |
SetBillboardModevoid
public void SetBillboardMode(BaseMaterial3D.BillboardModeEnum mode);| Name | Type | Default |
|---|---|---|
mode | BaseMaterial3D.BillboardModeEnum | — |
SetDrawFlagvoid
public void SetDrawFlag(Label3D.DrawFlags flag, bool enabled);If true, the specified flag will be enabled.
| Name | Type | Default |
|---|---|---|
flag | Label3D.DrawFlags | — |
enabled | bool | — |
SetFontvoid
public void SetFont(Font font);| Name | Type | Default |
|---|---|---|
font | Font | — |
SetFontSizevoid
public void SetFontSize(int size);| Name | Type | Default |
|---|---|---|
size | int | — |
SetHorizontalAlignmentvoid
public void SetHorizontalAlignment(HorizontalAlignment alignment);| Name | Type | Default |
|---|---|---|
alignment | HorizontalAlignment | — |
SetJustificationFlagsvoid
public void SetJustificationFlags(TextServer.JustificationFlag justificationFlags);| Name | Type | Default |
|---|---|---|
justificationFlags | TextServer.JustificationFlag | — |
SetLanguagevoid
public void SetLanguage(string language);| Name | Type | Default |
|---|---|---|
language | string | — |
SetLineSpacingvoid
public void SetLineSpacing(float lineSpacing);| Name | Type | Default |
|---|---|---|
lineSpacing | float | — |
SetModulatevoid
public void SetModulate(Color modulate);| Name | Type | Default |
|---|---|---|
modulate | Color | — |
SetOffsetvoid
public void SetOffset(Vector2 offset);| Name | Type | Default |
|---|---|---|
offset | Vector2 | — |
SetOutlineModulatevoid
public void SetOutlineModulate(Color modulate);| Name | Type | Default |
|---|---|---|
modulate | Color | — |
SetOutlineRenderPriorityvoid
public void SetOutlineRenderPriority(int priority);| Name | Type | Default |
|---|---|---|
priority | int | — |
SetOutlineSizevoid
public void SetOutlineSize(int outlineSize);| Name | Type | Default |
|---|---|---|
outlineSize | int | — |
SetPixelSizevoid
public void SetPixelSize(float pixelSize);| Name | Type | Default |
|---|---|---|
pixelSize | float | — |
SetRenderPriorityvoid
public void SetRenderPriority(int priority);| Name | Type | Default |
|---|---|---|
priority | int | — |
SetStructuredTextBidiOverridevoid
public void SetStructuredTextBidiOverride(TextServer.StructuredTextParser parser);| Name | Type | Default |
|---|---|---|
parser | TextServer.StructuredTextParser | — |
SetStructuredTextBidiOverrideOptionsvoid
public void SetStructuredTextBidiOverrideOptions(Reckfell.Collections.Array args);| Name | Type | Default |
|---|---|---|
args | Reckfell.Collections.Array | — |
SetTextvoid
public void SetText(string text);| Name | Type | Default |
|---|---|---|
text | string | — |
SetTextDirectionvoid
public void SetTextDirection(TextServer.Direction direction);| Name | Type | Default |
|---|---|---|
direction | TextServer.Direction | — |
SetTextureFiltervoid
public void SetTextureFilter(BaseMaterial3D.TextureFilterEnum mode);| Name | Type | Default |
|---|---|---|
mode | BaseMaterial3D.TextureFilterEnum | — |
SetUppercasevoid
public void SetUppercase(bool enable);| Name | Type | Default |
|---|---|---|
enable | bool | — |
SetVerticalAlignmentvoid
public void SetVerticalAlignment(VerticalAlignment alignment);| Name | Type | Default |
|---|---|---|
alignment | VerticalAlignment | — |
SetWidthvoid
public void SetWidth(float width);| Name | Type | Default |
|---|---|---|
width | float | — |
Label3D.AlphaCutMode
| Value | Description |
|---|---|
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. |
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 |
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.DrawFlags
| Value | Description |
|---|---|
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 |
Shaded = 0 | If set, lights in the environment affect the label. |