Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UTextRenderComponent
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Components/TextRenderComponent.h |
Include | #include "Components/TextRenderComponent.h" |
Syntax
UCLASS (ClassGroup=Rendering,
HideCategories=(Object, LOD, Physics, TextureStreaming, Activation, "Components|Activation", Collision),
EditInlineNew, Meta=(BlueprintSpawnableComponent=""), MinimalAPI)
class UTextRenderComponent : public UPrimitiveComponent
Remarks
Renders text in the world with given font. Contains usual font related attributes such as Scale, Alignment, Color etc.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
uint32: 1 | bAlwaysRenderAsText | Allows text to draw unmodified when using debug visualization modes. |
![]() ![]() ![]() ![]() |
TObjectPtr< class UFont > | Font | Text font |
![]() ![]() ![]() ![]() |
TEnumAsByte< enum EHorizTextAligment > | HorizontalAlignment | Horizontal text alignment |
![]() ![]() ![]() ![]() |
float | HorizSpacingAdjust | Horizontal adjustment per character, default is 0.0 |
![]() ![]() |
float | InvDefaultSize | The inverse of the Font's character height. |
![]() ![]() ![]() ![]() |
FText | Text | Text content, can be multi line using |
as line separator | |||
![]() ![]() ![]() ![]() |
TObjectPtr< class UMaterialInterface > | TextMaterial | Text material |
![]() ![]() ![]() ![]() |
FColor | TextRenderColor | Color of the text, can be accessed as vertex color |
![]() ![]() ![]() ![]() |
TEnumAsByte< enum EVerticalTextAligment > | VerticalAlignment | Vertical text alignment |
![]() ![]() ![]() ![]() |
float | VertSpacingAdjust | Vertical adjustment per character, default is 0.0 |
![]() ![]() ![]() ![]() |
float | WorldSize | Vertical size of the fonts largest character in world units. |
![]() ![]() ![]() ![]() |
float | XScale | Horizontal scale, default is 1.0 |
![]() ![]() ![]() ![]() |
float | YScale | Vertical scale, default is 1.0 |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UTextRenderComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
FVector | Get local size of text | |
![]() ![]() ![]() ![]() |
FVector | Get world space size of text | |
![]() ![]() |
void | ||
![]() ![]() ![]() |
void | K2_SetText
(
const FText& Value |
Change the text value and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | Change the font and signal the primitives to be rebuilt | |
![]() ![]() ![]() |
void | SetHorizontalAlignment
(
EHorizTextAligment Value |
Change the horizontal alignment and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetHorizSpacingAdjust
(
float Value |
Change the text horizontal spacing adjustment and signal the primitives to be rebuilt |
![]() ![]() |
void | Change the text value and signal the primitives to be rebuilt | |
![]() ![]() ![]() |
void | SetTextMaterial
(
UMaterialInterface* Material |
Change the text material and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetTextRenderColor
(
FColor Value |
Change the text render color and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetVerticalAlignment
(
EVerticalTextAligment Value |
Change the vertical alignment and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetVertSpacingAdjust
(
float Value |
Change the text vertical spacing adjustment and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetWorldSize
(
float Value |
Change the world size of the text and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetXScale
(
float Value |
Change the text X scale and signal the primitives to be rebuilt |
![]() ![]() ![]() |
void | SetYScale
(
float Value |
Change the text Y scale and signal the primitives to be rebuilt |
![]() ![]() |
void |
Overridden from UPrimitiveComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | |
![]() ![]() ![]() |
UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index |
![]() ![]() ![]() |
int32 | Return number of material elements in this primitive | |
![]() ![]() ![]() |
FMatrix | Returns the matrix that should be used to render this component. | |
![]() ![]() ![]() |
void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component |
![]() ![]() |
void | SetMaterial
(
int32 ElementIndex, |
Changes the material applied to an element of the mesh. |
![]() ![]() ![]() |
bool | Determines whether the proxy for this primitive type needs to be recreated whenever the primitive moves. |
Overridden from USceneComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |
![]() ![]() |
bool | GetMaterialPropertyPath
(
int32 ElementIndex, |
Returns full material property path and UObject owner property object Path examples: Material property path with array element and inner struct Materials[0].InnerStruct.Material Material property path with array element Materials[0] Simple material property path Materials |
![]() ![]() |
void | UpdateBounds () |
Note: this is required because GetRenderMatrix is overridden, and therefore the updated world-space bounds must be based on that (not the component transform) |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | PrecachePSOs () |
Precache all PSOs which can be used by the primitive component |
![]() ![]() ![]() |
bool | Return true if this component requires end of frame updates to happen from the game thread. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |