struct
TextRenderComponent
UE's Text Render: a line (or lines) of text standing in the level as a flat plane on the entity's XY axes, facing along its forward. The renderer rasterises the string once per change and draws it as an in-scene quad that geometry occludes, tinted by Color.
- Module
- SceneTypes
- Header
#include "SceneTypes/Components/TextRenderComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
std::string | text | Default "Text". |
float | worldSize | The height of one line of text in metres; the width follows the string. Default 0.25f. |
Vec3 | color | Default Vec3(1.0f, 1.0f, 1.0f). |
ETextRenderHAlign | horizontalAlignment | Which point of the text block sits on the entity's origin. Default ETextRenderHAlign::Left. |
ETextRenderVAlign | verticalAlignment | Default ETextRenderVAlign::Top. |
Ref<Image2D> | texture | The rasterised string and what it was cut from: rebuilt when the text changes, never serialized. |
std::string | rasterText | |
float | rasterAspect | Default 0.0f. |
float | rasterLines | Default 1.0f. |
Public functions
| Returns | Name | Description |
|---|---|---|
Vec2 | AlignmentOffset | The text block's centre relative to the origin, in units of one line height, for a block aspect lines wide and lines tall: Left puts the origin on the left edge, Top on the top edge (Y up). |
Mat4 | QuadLocalMatrix | The text quad in entity space. |
Function details
AlignmentOffset
C++
static Vec2 AlignmentOffset(ETextRenderHAlign horizontal, ETextRenderVAlign vertical, float aspect, float lines)The text block's centre relative to the origin, in units of one line height, for a block aspect lines wide and lines tall: Left puts the origin on the left edge, Top on the top edge (Y up).
QuadLocalMatrix
C++
static Mat4 QuadLocalMatrix(ETextRenderHAlign horizontal, ETextRenderVAlign vertical, float aspect, float lines, float size)The text quad in entity space. Forward is -Z, so a reader standing in front looks along +Z and has -X on their right: the block is turned half a turn about Y, or it reads mirrored from the front and correctly only from behind.
Generated from SceneTypes/Components/TextRenderComponent.h via scenetypes.json · Nov 4, 2026Version 1.0.0